Bug #640 Password() function is inconsistent
Submitted: 11 Jun 2003 21:49 Modified: 12 Jun 2003 4:16
Reporter: Philip Antoniades Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:4.1.0 OS:Linux (Linux x86)
Assigned to: Peter Zaitsev CPU Architecture:Any

[11 Jun 2003 21:49] Philip Antoniades
Description:
The function password() does not seem to return the same code on multiple runs with the same input. 

I'm using:
mysql  Ver 13.5 Distrib 4.1.0-alpha, for pc-linux (i686)

from the binary (non-rpm) distribution on a Mandrake 9.1 system.

 

How to repeat:
mysql> select password('foo') = password( 'foo' );
+-------------------------------------+
| password('foo') = password( 'foo' ) |
+-------------------------------------+
|                                   0 |
+-------------------------------------+
1 row in set (0.00 sec)

mysql> select password( 'foo' ), now();
+-----------------------------------------------+---------------------+
| password( 'foo' )                             | now()               |
+-----------------------------------------------+---------------------+
| *6a14c5b4a62c2d635175a59b08f5069d25e7f767d98c | 2003-06-12 00:47:53 |
+-----------------------------------------------+---------------------+
1 row in set (0.00 sec)
 
mysql> select password( 'foo' ), now();
+-----------------------------------------------+---------------------+
| password( 'foo' )                             | now()               |
+-----------------------------------------------+---------------------+
| *f04a7b3789e414ca99390011a99538a805b6812055f2 | 2003-06-12 00:47:55 |
+-----------------------------------------------+---------------------+
[12 Jun 2003 4:16] Jani Tolonen
It is going to be changed back in the future release 4.1.1 so that
it returns the same value back on each run.

However, the value will differ between different versions of MySQL servers.

We'll update the manual with some info about this soon.

Regards,
Jani