Re: ENCODE() on MySQL 5.0 differs from 5.5+
Posted by: Carl Dreher
Date: November 13, 2012 09:29PM

Well, this IS interesting.

On the XP-Pro, 32-bit system, MySQL 5.0, the command
ENCODE('password','abcdedghijklmnopqrstuvwxyz') returns

but on the W7-64bit system with MySQL 5.5, it returns

But if I wrap each command in the HEX operator, as per your suggestion, they both return the same value

Both systems are using the Latin1 char set.

The problem this caused was when I did a SQL "dump" of the database from the XP system, which generates a large file full of SQL statements, including statements such as
INSERT INTO passwords VALUES(ºƒŽ%aôÝ)
Then I then ran this file in the W7 system to create and build the database. Naturally, when I tried to use it, all the passwords didn't DECODE correctly.

Still wondering what is going on.

Options: ReplyQuote

Written By
Re: ENCODE() on MySQL 5.0 differs from 5.5+
November 13, 2012 09:29PM

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.