SET @global_old_passwords = @@GLOBAL.old_passwords; SET @session_old_passwords = @@SESSION.old_passwords; SET @global_secure_auth = @@GLOBAL.secure_auth; '#------------------------FN_DYNVARS_115_01---------------------------#' ** Connection default ** CREATE USER 'userNewPass1'@'localhost' IDENTIFIED BY 'pass1'; CREATE USER 'userNewPass2'@'localhost' IDENTIFIED BY 'pass2'; SET GLOBAL old_passwords = 1; SET SESSION old_passwords = 1; CREATE USER 'userOldPass'@'localhost' IDENTIFIED WITH 'mysql_old_password'; SET PASSWORD FOR 'userOldPass'@'localhost'= PASSWORD('pass3'); Warnings: Warning 1287 'pre-4.1 password hash' is deprecated and will be removed in a future release. Please use post-4.1 password hash instead SET GLOBAL secure_auth = FALSE; Warnings: Warning 1287 'pre-4.1 password hash' is deprecated and will be removed in a future release. Please use post-4.1 password hash instead ** Connecting con1 using username 'userNewPass1' ** SELECT CURRENT_USER(); CURRENT_USER() userNewPass1@localhost userNewPass1@localhost Expected ** Connecting con2 using username 'userNewPass2' ** SELECT CURRENT_USER(); CURRENT_USER() userNewPass2@localhost userNewPass2@localhost Expected ** Connecting con3 using username 'userOldPass' ** SELECT CURRENT_USER(); CURRENT_USER() userOldPass@localhost userOldPass@localhost Expected ** Connection default ** ** Disconnecting con1, con2, con3 ** '#------------------------FN_DYNVARS_115_02---------------------------#' SET GLOBAL secure_auth = TRUE; ** Connecting con1 using username 'userNewPass1' ** SELECT CURRENT_USER(); CURRENT_USER() userNewPass1@localhost userNewPass1@localhost Expected ** Connecting con2 using username 'userNewPass2' ** SELECT CURRENT_USER(); CURRENT_USER() userNewPass2@localhost userNewPass2@localhost Expected ** Connecting con3 using username 'userOldPass' ** ERROR HY000: Server is running in --secure-auth mode, but 'userOldPass'@'localhost' has a password in the old format; please change the password to the new format Expected Error 'Server is running in secure auth mode' SELECT CURRENT_USER(); CURRENT_USER() userNewPass2@localhost userNewPass2@localhost Expected ** Connection default ** ** Disconnecting con1, con2 ** DROP USER 'userNewPass1'@'localhost'; DROP USER 'userNewPass2'@'localhost'; DROP USER 'userOldPass'@'localhost'; SET @@GLOBAL.old_passwords = @global_old_passwords; SET @@SESSION.old_passwords = @session_old_passwords; SET @@GLOBAL.secure_auth = @global_secure_auth;