mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
cannot use lex->grant_user= ¤t_user, where LEX_USER current_user is a global constant,
because parser might modify the lex->user (e.g. set lex->user-password). switch to use LEX_STRING current_user string, and also change other similar constants to be LEX_STRING's for consistency.
This commit is contained in:
@ -61,9 +61,9 @@ GRANT test_role1 TO 'test_user'@'localhost'
|
||||
GRANT test_role2 TO 'test_user'@'localhost'
|
||||
show grants for test_user@localhost;
|
||||
Grants for test_user@localhost
|
||||
GRANT test_role2 TO 'test_user'@'localhost'
|
||||
GRANT test_role1 TO 'test_user'@'localhost'
|
||||
GRANT USAGE ON *.* TO 'test_user'@'localhost'
|
||||
GRANT test_role1 TO 'test_user'@'localhost'
|
||||
GRANT test_role2 TO 'test_user'@'localhost'
|
||||
show grants for test_role1;
|
||||
ERROR 42000: Access denied for user 'test_user'@'localhost' to database 'mysql'
|
||||
show grants for test_role2;
|
||||
|
@ -40,6 +40,7 @@ select current_user(), current_role();
|
||||
--sorted_result
|
||||
show grants;
|
||||
|
||||
--sorted_result
|
||||
show grants for test_user@localhost;
|
||||
--error ER_DBACCESS_DENIED_ERROR
|
||||
show grants for test_role1;
|
||||
|
Reference in New Issue
Block a user