mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-24098 CREATE USER/ALTER USER PASSWORD EXPIRE/LOCK in either order
Reviewed-by: vicentiu@mariadb.org
This commit is contained in:
@ -143,6 +143,25 @@ alter user user1@localhost account lock;
|
||||
--echo #
|
||||
alter user user1@localhost PASSWORD EXPIRE;
|
||||
show create user user1@localhost;
|
||||
drop user user1@localhost;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-24098 CREATE USER/ALTER USER PASSWORD EXPIRE/LOCK in
|
||||
--echo # either order.
|
||||
--echo #
|
||||
create user user1@localhost PASSWORD EXPIRE ACCOUNT LOCK;
|
||||
show create user user1@localhost;
|
||||
drop user user1@localhost;
|
||||
create user user1@localhost ACCOUNT LOCK PASSWORD EXPIRE;
|
||||
show create user user1@localhost;
|
||||
alter user user1@localhost PASSWORD EXPIRE NEVER ACCOUNT UNLOCK ;
|
||||
show create user user1@localhost;
|
||||
alter user user1@localhost ACCOUNT LOCK PASSWORD EXPIRE DEFAULT;
|
||||
show create user user1@localhost;
|
||||
# note output needs to be corrected by MDEV-24114: password expire users cannot be unexpired
|
||||
alter user user1@localhost PASSWORD EXPIRE INTERVAL 60 DAY ACCOUNT UNLOCK;
|
||||
select * from mysql.global_priv where user='user1';
|
||||
show create user user1@localhost;
|
||||
|
||||
drop user user1@localhost;
|
||||
drop user user2@localhost;
|
||||
|
Reference in New Issue
Block a user