mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
MDEV-24114 SHOW CREATE USER doesnt display correct password expiry status
Given PASSWORD EXPIRE and PASSWORD EXPIRE [NEVER|INTERVAL x DAY] are two different mechanisms, SHOW CREATE USER should display all the information required to restore the state of an account which includes both a manual expired state and an automatic policy. The solution proposed here keeps a CREATE USER ... PASSWORD EXPIRE statement and adds an aditional ALTER USER .. PASSWORD EXPIRE [NEVER|INTERVAL x DAY] when necessary This way a tool can restore almost the complete state of an account as it was before a dump. The only information left still is the value of the password_last_changed column from mysql.global_priv
This commit is contained in:
@ -214,6 +214,7 @@ alter user user@localhost password expire;
|
||||
show create user user@localhost;
|
||||
CREATE USER for user@localhost
|
||||
CREATE USER `user`@`localhost` PASSWORD EXPIRE
|
||||
ALTER USER `user`@`localhost` PASSWORD EXPIRE INTERVAL 123 DAY
|
||||
set password for user@localhost= password('');
|
||||
show create user user@localhost;
|
||||
CREATE USER for user@localhost
|
||||
|
Reference in New Issue
Block a user