Bug #41748 Column not found using AES_DECRYPT
Submitted: 25 Dec 2008 17:54 Modified: 15 Apr 2014 14:14
Reporter: Juan Sanchez Email Updates:
Status: Can't repeat Impact on me:
None 
Category:Connector / J Severity:S2 (Serious)
Version:5.1.7 OS:Windows (Vista x64)
Assigned to: Alexander Soklakov CPU Architecture:Any

[25 Dec 2008 17:54] Juan Sanchez
Description:
hi! Im trying to encrypt/decrypt data from my Database, the query for inserting the data is working but when I want to retreive it I get a column not found error. 

Here is the code

SELECT idPaciente, Nombres, Apellidos, DNI_NIF, Sexo, Nacimiento, tlf, tlf2, email," +
" Direccion, Ciudad, Provincia, CP, Canal, Prescriptor, Cobertura, Seguridad_Social, Alta," +
" Condicion, Responsable, Nombremp, NIFemp, Direccionemp, FormaPago,AES_DECRYPT(Cuenta,'test_text')," +
" Baja FROM PACIENTE WHERE idPaciente=?

Now if I try the query in the mysql query browser I dont get any error, but I get it in my java code. 

The user/pass/table/column/context are all correct, to use to the database I use:

String URL_bd = "jdbc:mysql://localhost:3306/Test";
String usuario = "root";
String contraseƱa = "admin";
// Conectar con la BD
conexion = DriverManager.getConnection(URL_bd,usuario,contraseƱa); 

I dont know why is this happening.

Thanks a lot !

How to repeat:
SELECT idPaciente, Nombres, Apellidos, DNI_NIF, Sexo, Nacimiento, tlf, tlf2, email," +
" Direccion, Ciudad, Provincia, CP, Canal, Prescriptor, Cobertura, Seguridad_Social, Alta," +
" Condicion, Responsable, Nombremp, NIFemp, Direccionemp, FormaPago,AES_DECRYPT(Cuenta,'test_text')," +
" Baja FROM PACIENTE WHERE idPaciente=?
[26 Dec 2008 9:13] Sveta Smirnova
Thank you for the report.

I can not repeat described behavior with generic data.

Could you please provide Java code which demonstrates the problem and output of SHOW CREATE TABLE PACIENTE
[27 Jan 2009 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".
[15 Apr 2014 14:14] Alexander Soklakov
Hi Juan,

I close this report as "Can't repeat" because there is no feedback over 5 years and situation wasn't reproduced. Please, feel free to reopen it if the
problem still exists in current driver and you can provide a repeatable test case.