1
0
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:
Robert Bindar
2020-12-15 17:39:24 +02:00
parent 7b8dacc488
commit 8b77e6c676
4 changed files with 42 additions and 8 deletions

View File

@ -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