DBZ-6020 ALTER and CREATE USER allow ROLE option

This commit is contained in:
Anisha Mohanty 2023-01-25 12:14:46 +05:30 committed by Jiri Pechanec
parent acc9203c5c
commit e4a94d55dd
2 changed files with 4 additions and 0 deletions

View File

@ -1616,12 +1616,15 @@ alterUser
(WITH userResourceOption+)?
(userPasswordOption | userLockOption)*
(COMMENT STRING_LITERAL | ATTRIBUTE STRING_LITERAL)? #alterUserMysqlV80
| ALTER USER ifExists?
(userName | uid) DEFAULT ROLE roleOption #alterUserMysqlV80
;
createUser
: CREATE USER userAuthOption (',' userAuthOption)* #createUserMysqlV56
| CREATE USER ifNotExists?
userAuthOption (',' userAuthOption)*
(DEFAULT ROLE roleOption)?
(
REQUIRE
(tlsNone=NONE | tlsOption (AND? tlsOption)* )

View File

@ -117,6 +117,7 @@ alter user 'user'@'%' identified with 'mysql_native_password' as '*2470C0C06DEE4
alter user 'user'@'%' identified with 'mysql_native_password' as '*2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19'
require none password expire default account unlock password_lock_time unbounded;
alter user 'user'@'%' identified by 'newpassword' retain current password;
ALTER USER 'mattias.hultman' DEFAULT ROLE `prod-spain-mysql-read-only`@`%`;
rename user user1@100.200.1.1 to user2@100.200.1.2;
rename user user1@100.200.1.1 to user2@2001:0db8:85a3:0000:0000:8a2e:0370:7334;
#end