Bug #80533 PASSWORD(NULL) returns empty string, should be NULL according to documentation
Submitted: 26 Feb 2016 14:46 Modified: 26 Feb 2016 16:15
Reporter: Elena Stepanova Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: DML Severity:S3 (Non-critical)
Version:5.6, 5.7 OS:Any
Assigned to: CPU Architecture:Any

[26 Feb 2016 14:46] Elena Stepanova
Description:
http://dev.mysql.com/doc/refman/5.7/en/encryption-functions.html#function_password
<quote>
The return value is a nonbinary string in the connection character set, or NULL if the argument is NULL. 
</quote>

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

MySQL [test]> select @@version;
+--------------+
| @@version    |
+--------------+
| 5.6.28-debug |
+--------------+
1 row in set (0.00 sec)

It might have been an intentional change in scope of WL5602 (or something else), in this case documentation needs to be updated. 

How to repeat:
select password(null);
[26 Feb 2016 16:15] MySQL Verification Team
Thank you for the bug report.

C:\dbs>c:\dbs\5.7\bin\mysql -uroot -p --port=3570 --prompt="mysql 5.7 > "
Enter password: ******
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.7.12 Source distribution PULL: 2016-FEB-19

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql 5.7 > select password(null);
+----------------+
| password(null) |
+----------------+
|                |
+----------------+
1 row in set (0.00 sec)

mysql 5.7 >