MySQL Forums
Forum List  »  Quality Assurance

Bug? Problem using 'Order By' with AES_DECRYPT. How can i do?(Updated)
Posted by: Lee Mitchell
Date: June 25, 2008 03:50AM

Hello all.

MySQL 5.0.22.
1. Two simple relative table.
2. trying to join with 'Left'
3. and also using AES_DECRYPT func(encrypted colume is BLOB)
4. and i want to sort by decrypted colume.
5. querying and fetching.
6. finally, we've got un-decryped recordset.

When i use order by clause with AES_DECRYPT func,
data records dose not decrypted.
Bur what if remove 'order by' clause, works fine. Decryption working well.
How can i do? SUN, please tell me.


here is a SQL has problem. ----------------
SET @key='test';
select tableA.id,
AES_DECRYPT(tableB.char1, @key),
AES_DECRYPT(tableB.char2, @key),
AES_DECRYPT(tableB.char3, @key)
from tableA
left join tableB on tableA.id = tableB.id
where
tableA.id = 'myid'
order by
AES_DECRYPT(tableB.char1, @key);



Edited 2 time(s). Last edit at 06/26/2008 02:06AM by Lee Mitchell.

Options: ReplyQuote


Subject
Views
Written By
Posted
Bug? Problem using 'Order By' with AES_DECRYPT. How can i do?(Updated)
3463
June 25, 2008 03:50AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.