PASSWORD(NULL) returns empty string, should be NULL according to documentation

Description

1 2 3 4 5 6 7 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.

Environment

None

Status

Assignee

Unassigned

Reporter

Elena Stepanova

Labels

External issue ID

None

External issue ID

None

Components

Fix versions

Affects versions

10.0
10.1

Priority

Minor