[MDEV-9642] PASSWORD(NULL) returns empty string, should be NULL according to documentation Created: 2016-02-26  Updated: 2018-01-10  Resolved: 2018-01-10

Status: Closed
Project: MariaDB Server
Component/s: OTHER
Affects Version/s: 10.0, 10.1, 10.3.4
Fix Version/s: N/A

Type: Bug Priority: Minor
Reporter: Elena Stepanova Assignee: Ian Gilfillan
Resolution: Fixed Votes: 0
Labels: upstream


 Description   

MariaDB [test]> select password(null);
+----------------+
| password(null) |
+----------------+
|                |
+----------------+
1 row in set (0.00 sec)

https://mariadb.com/kb/en/mariadb/password

Calculates and returns a hashed password string from the plaintext password str, or NULL if the argument was NULL.

Same in MySQL manual: http://dev.mysql.com/doc/refman/5.7/en/encryption-functions.html#function_password

MySQL 5.6/5.7 are also affected.



 Comments   
Comment by Daniel Black [ 2018-01-01 ]

did you want to change our documentation to not include the same https://mariadb.com/kb/en/library/password/ greenman?

MariaDB [test]>  select isnull(password(null)), version();
+------------------------+----------------+
| isnull(password(null)) | version()      |
+------------------------+----------------+
|                      0 | 10.3.4-MariaDB |
+------------------------+----------------+

Comment by Ian Gilfillan [ 2018-01-10 ]

This was changed in MariaDB 10.0.4, and seems to be intentional - https://mariadb.com/kb/en/library/mariadb-1004-changelog/ - so have documented and am closing.

Generated at Thu Feb 08 07:36:13 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.