Bug #24129 AES_ENCRYPT and AES_DECRYPT error by MySQLConnector Net 1.0.8 .NET Framework 2.0
Submitted: 9 Nov 2006 8:47 Modified: 11 Jan 2007 14:38
Reporter: asdasd dasd Email Updates:
Status: No Feedback Impact on me:
None 
Category:Connector / NET Severity:S2 (Serious)
Version:4.1.20-community-nt OS:Windows (Windows XP and Windows 2003)
Assigned to: CPU Architecture:Any
Tags: 1.0.8, AES_DECRYPT, AES_ENCRYPT, connector, NET

[9 Nov 2006 8:47] asdasd dasd
Description:
Error to encode spanish special charts.
Ñ, á, Á, etc;
ñ Ñ á

The select with AES_DECRYPT return "?"

Error in:

Encode, Decode, AES_ENCRYPT, AES_DECRYPT, etc.

The severity is "serious" because in spanish doesn't work.

How to repeat:
insert into prueba (campo1) values (AES_ENCRYPT('HOLAÓóñÑ','HOLA'));

select AES_DECRYPT(campo1,'HOLA')as campo1 from prueba;

This returns: "HOLA????"

Suggested fix:
Return to MySQL Connector Net 1.0.7
[13 Nov 2006 8:44] Tonci Grgin
Hi Charlos and thanks for your problem report.

Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.mysql.com/how-to-report.php

If you can provide more information, feel free to add it to this bug and change the status back to 'Open'.

Thank you for your interest in MySQL.

Explanation: Can you please post following:
 - NET FW version used
 - my.cnf/my.ini from the server
 - complete tets case exhibiting this error (VS I presume)
What does "SHOW VARIABLES LIKE "%char%"" say? What is your connect string?
[8 Dec 2006 20:54] charlos jim
Version .NET: v2.0.50727
[8 Dec 2006 20:57] charlos jim
SHOW VARIABLES LIKE "%char%"

Variable_name                  Value                                                          
character_set_client           latin1                                                         
character_set_connection       latin1                                                         
character_set_database         latin1                                                         
character_set_results          latin1                                                         
character_set_server           latin1                                                         
character_set_system           utf8                                                           
character_sets_dir             C:\Archivos de programa\MySQL\MySQL Server 4.1\share\charsets/
[8 Dec 2006 21:03] charlos jim
my.ini:

[client]

port=3306

[mysql]

default-character-set=latin1

[mysqld]

port=3306

basedir="C:/Archivos de programa/MySQL/MySQL Server 4.1/"

datadir="C:/Archivos de programa/MySQL/MySQL Server 4.1/Data/"

default-character-set=latin1

default-storage-engine=INNODB

max_connections=400
connect_timeout=20
net_buffer_length=128

query_cache_size=0

table_cache=256

tmp_table_size=185M

thread_cache_size=8

myisam_max_sort_file_size=100G

myisam_max_extra_sort_file_size=100G

myisam_sort_buffer_size=369M

key_buffer_size=318M

read_buffer_size=64K
read_rnd_buffer_size=256K

sort_buffer_size=256K

innodb_additional_mem_pool_size=13M

innodb_flush_log_at_trx_commit=1

innodb_log_buffer_size=7M

innodb_buffer_pool_size=617M

innodb_log_file_size=24M

innodb_thread_concurrency=8
[8 Dec 2006 21:11] charlos jim
OS:
Microsoft Windows Server 2003 Enterprise Edition built 3790.0 (Spanish)
Service Pack 1
[11 Dec 2006 14:19] Tonci Grgin
Sorry Charlos I think there's been some mistake here. Changing status back.
[11 Dec 2006 14:38] Tonci Grgin
Charlos, what is your table structure? This question is regarding http://dev.mysql.com/doc/refman/4.1/en/encryption-functions.html:

Note: The encryption and compression functions return binary strings. For many of these functions, the result might contain arbitrary byte values. If you want to store these results, use a BLOB  column rather than a CHAR or (before MySQL 5.0.3) VARCHAR column to avoid potential problems with trailing space removal that would change data values.
[12 Jan 2007 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".