diff options
-rw-r--r-- | mysql-test/r/set_password.result | 18 | ||||
-rw-r--r-- | mysql-test/r/show_grants_with_plugin-7985.result | 2 | ||||
-rw-r--r-- | mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result | 8 | ||||
-rw-r--r-- | sql/sql_acl.cc | 5 | ||||
-rw-r--r-- | storage/tokudb/mysql-test/rpl/r/rpl_tokudb_mixed_dml.result | 8 |
5 files changed, 21 insertions, 20 deletions
diff --git a/mysql-test/r/set_password.result b/mysql-test/r/set_password.result index 315d0bef9fb..733d9c96187 100644 --- a/mysql-test/r/set_password.result +++ b/mysql-test/r/set_password.result @@ -11,10 +11,10 @@ select user, host, password, plugin, authentication_string from mysql.user where user host password plugin authentication_string natauth localhost *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 newpass localhost *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 -newpassnat localhost mysql_native_password *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 +newpassnat localhost *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 mysql_native_password *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 oldauth localhost 378b243e220ca493 oldpass localhost 378b243e220ca493 -oldpassold localhost mysql_old_password 378b243e220ca493 +oldpassold localhost 378b243e220ca493 mysql_old_password 378b243e220ca493 connect con,localhost,natauth,test,; select current_user(); current_user() @@ -86,12 +86,12 @@ set password for oldpass@localhost = PASSWORD('test2'); set password for oldpassold@localhost = PASSWORD('test2'); select user, host, password, plugin, authentication_string from mysql.user where user != 'root'; user host password plugin authentication_string -natauth localhost mysql_native_password *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E -newpass localhost mysql_native_password *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E -newpassnat localhost mysql_native_password *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E -oldauth localhost mysql_native_password *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E -oldpass localhost mysql_native_password *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E -oldpassold localhost mysql_native_password *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E +natauth localhost *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E mysql_native_password *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E +newpass localhost *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E mysql_native_password *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E +newpassnat localhost *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E mysql_native_password *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E +oldauth localhost *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E mysql_native_password *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E +oldpass localhost *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E mysql_native_password *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E +oldpassold localhost *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E mysql_native_password *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E connect con,localhost,natauth,test2,; select current_user(); current_user() @@ -173,7 +173,7 @@ disconnect foo; connection default; select user,host,password,plugin,authentication_string from mysql.user where user='foo'; user host password plugin authentication_string -foo localhost mysql_native_password *E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB +foo localhost *E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB mysql_native_password *E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB set password for 'foo'@'localhost' = ''; select user,host,password,plugin,authentication_string from mysql.user where user='foo'; user host password plugin authentication_string diff --git a/mysql-test/r/show_grants_with_plugin-7985.result b/mysql-test/r/show_grants_with_plugin-7985.result index 0f8e1e39969..bb475b7cba9 100644 --- a/mysql-test/r/show_grants_with_plugin-7985.result +++ b/mysql-test/r/show_grants_with_plugin-7985.result @@ -71,7 +71,7 @@ connection default; set password for u1 = PASSWORD('SOMETHINGELSE'); select user, host, password, plugin, authentication_string from mysql.user where user = 'u1'; user host password plugin authentication_string -u1 % mysql_native_password *054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6 +u1 % *054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6 mysql_native_password *054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6 # # Here we should use the password field, as that primes over # the authentication_string field. diff --git a/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result b/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result index 24ce8899e2c..00b50df4a68 100644 --- a/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result +++ b/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result @@ -518,24 +518,24 @@ connection master; SET PASSWORD FOR 'user_test_rpl'@'localhost' = '*0000000000000000000000000000000000000000'; SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%'; host user password plugin authentication_string select_priv -localhost user_test_rpl mysql_native_password *0000000000000000000000000000000000000000 N +localhost user_test_rpl *0000000000000000000000000000000000000000 mysql_native_password *0000000000000000000000000000000000000000 N connection slave; USE test_rpl; SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%'; host user password plugin authentication_string select_priv -localhost user_test_rpl mysql_native_password *0000000000000000000000000000000000000000 N +localhost user_test_rpl *0000000000000000000000000000000000000000 mysql_native_password *0000000000000000000000000000000000000000 N connection master; ******************** RENAME USER ******************** RENAME USER 'user_test_rpl'@'localhost' TO 'user_test_rpl_2'@'localhost'; SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%'; host user password plugin authentication_string select_priv -localhost user_test_rpl_2 mysql_native_password *0000000000000000000000000000000000000000 N +localhost user_test_rpl_2 *0000000000000000000000000000000000000000 mysql_native_password *0000000000000000000000000000000000000000 N connection slave; USE test_rpl; SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%'; host user password plugin authentication_string select_priv -localhost user_test_rpl_2 mysql_native_password *0000000000000000000000000000000000000000 N +localhost user_test_rpl_2 *0000000000000000000000000000000000000000 mysql_native_password *0000000000000000000000000000000000000000 N connection master; ******************** DROP USER ******************** diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 733d844e5e4..fd213c528e1 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -2056,7 +2056,9 @@ static bool acl_load(THD *thd, const Grant_tables& tables) user_table.authentication_string())); user.auth_string.length= strlen(user.auth_string.str); - if (user.auth_string.length && password_len) + if (user.auth_string.length && password_len && + (user.auth_string.length != password_len || + memcmp(user.auth_string.str, password, password_len))) { sql_print_warning("'user' entry '%s@%s' has both a password " "and an authentication plugin specified. The " @@ -3927,7 +3929,6 @@ static bool update_user_table(THD *thd, const User_table& user_table, { set_authentication_plugin_from_password(user_table, new_password, new_password_len); - new_password_len= 0; } if (user_table.password()) diff --git a/storage/tokudb/mysql-test/rpl/r/rpl_tokudb_mixed_dml.result b/storage/tokudb/mysql-test/rpl/r/rpl_tokudb_mixed_dml.result index a5060d9e3bf..65057791b48 100644 --- a/storage/tokudb/mysql-test/rpl/r/rpl_tokudb_mixed_dml.result +++ b/storage/tokudb/mysql-test/rpl/r/rpl_tokudb_mixed_dml.result @@ -521,24 +521,24 @@ connection master; SET PASSWORD FOR 'user_test_rpl'@'localhost' = '*0000000000000000000000000000000000000000'; SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%'; host user password plugin authentication_string select_priv -localhost user_test_rpl mysql_native_password *0000000000000000000000000000000000000000 N +localhost user_test_rpl *0000000000000000000000000000000000000000 mysql_native_password *0000000000000000000000000000000000000000 N connection slave; USE test_rpl; SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%'; host user password plugin authentication_string select_priv -localhost user_test_rpl mysql_native_password *0000000000000000000000000000000000000000 N +localhost user_test_rpl *0000000000000000000000000000000000000000 mysql_native_password *0000000000000000000000000000000000000000 N connection master; ******************** RENAME USER ******************** RENAME USER 'user_test_rpl'@'localhost' TO 'user_test_rpl_2'@'localhost'; SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%'; host user password plugin authentication_string select_priv -localhost user_test_rpl_2 mysql_native_password *0000000000000000000000000000000000000000 N +localhost user_test_rpl_2 *0000000000000000000000000000000000000000 mysql_native_password *0000000000000000000000000000000000000000 N connection slave; USE test_rpl; SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%'; host user password plugin authentication_string select_priv -localhost user_test_rpl_2 mysql_native_password *0000000000000000000000000000000000000000 N +localhost user_test_rpl_2 *0000000000000000000000000000000000000000 mysql_native_password *0000000000000000000000000000000000000000 N connection master; ******************** DROP USER ******************** |