mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
information_schema.enabled_roles table
This commit is contained in:
@ -36,6 +36,10 @@ select current_user(), current_role();
|
||||
current_user() current_role()
|
||||
test_user@localhost NULL
|
||||
set role test_role1;
|
||||
select * from information_schema.enabled_roles;
|
||||
ROLE_NAME
|
||||
test_role2
|
||||
test_role1
|
||||
select current_user(), current_role();
|
||||
current_user() current_role()
|
||||
test_user@localhost test_role1
|
||||
@ -49,6 +53,9 @@ GRANT test_role1 TO 'test_user'@'localhost'
|
||||
GRANT test_role2 TO 'test_role1'
|
||||
GRANT test_role2 TO 'test_user'@'localhost'
|
||||
set role none;
|
||||
select * from information_schema.enabled_roles;
|
||||
ROLE_NAME
|
||||
NULL
|
||||
select current_user(), current_role();
|
||||
current_user() current_role()
|
||||
test_user@localhost NULL
|
||||
@ -81,6 +88,9 @@ ERROR 42000: There is no such grant defined for user 'test_user' on host 'localh
|
||||
show grants for CURRENT_ROLE();
|
||||
ERROR 42000: There is no such grant defined for user 'test_user' on host 'localhost'
|
||||
set role test_role2;
|
||||
select * from information_schema.enabled_roles;
|
||||
ROLE_NAME
|
||||
test_role2
|
||||
select current_user(), current_role();
|
||||
current_user() current_role()
|
||||
test_user@localhost test_role2
|
||||
|
@ -177,6 +177,29 @@ user_comment
|
||||
Separator -----------------------------------------------------
|
||||
TABLE_CATALOG def
|
||||
TABLE_SCHEMA information_schema
|
||||
TABLE_NAME ENABLED_ROLES
|
||||
TABLE_TYPE SYSTEM VIEW
|
||||
ENGINE MEMORY
|
||||
VERSION 10
|
||||
ROW_FORMAT Fixed
|
||||
TABLE_ROWS #TBLR#
|
||||
AVG_ROW_LENGTH #ARL#
|
||||
DATA_LENGTH #DL#
|
||||
MAX_DATA_LENGTH #MDL#
|
||||
INDEX_LENGTH #IL#
|
||||
DATA_FREE #DF#
|
||||
AUTO_INCREMENT NULL
|
||||
CREATE_TIME #CRT#
|
||||
UPDATE_TIME #UT#
|
||||
CHECK_TIME #CT#
|
||||
TABLE_COLLATION utf8_general_ci
|
||||
CHECKSUM NULL
|
||||
CREATE_OPTIONS #CO#
|
||||
TABLE_COMMENT #TC#
|
||||
user_comment
|
||||
Separator -----------------------------------------------------
|
||||
TABLE_CATALOG def
|
||||
TABLE_SCHEMA information_schema
|
||||
TABLE_NAME ENGINES
|
||||
TABLE_TYPE SYSTEM VIEW
|
||||
ENGINE MEMORY
|
||||
@ -1000,6 +1023,29 @@ user_comment
|
||||
Separator -----------------------------------------------------
|
||||
TABLE_CATALOG def
|
||||
TABLE_SCHEMA information_schema
|
||||
TABLE_NAME ENABLED_ROLES
|
||||
TABLE_TYPE SYSTEM VIEW
|
||||
ENGINE MEMORY
|
||||
VERSION 10
|
||||
ROW_FORMAT Fixed
|
||||
TABLE_ROWS #TBLR#
|
||||
AVG_ROW_LENGTH #ARL#
|
||||
DATA_LENGTH #DL#
|
||||
MAX_DATA_LENGTH #MDL#
|
||||
INDEX_LENGTH #IL#
|
||||
DATA_FREE #DF#
|
||||
AUTO_INCREMENT NULL
|
||||
CREATE_TIME #CRT#
|
||||
UPDATE_TIME #UT#
|
||||
CHECK_TIME #CT#
|
||||
TABLE_COLLATION utf8_general_ci
|
||||
CHECKSUM NULL
|
||||
CREATE_OPTIONS #CO#
|
||||
TABLE_COMMENT #TC#
|
||||
user_comment
|
||||
Separator -----------------------------------------------------
|
||||
TABLE_CATALOG def
|
||||
TABLE_SCHEMA information_schema
|
||||
TABLE_NAME ENGINES
|
||||
TABLE_TYPE SYSTEM VIEW
|
||||
ENGINE MEMORY
|
||||
|
@ -30,10 +30,12 @@ change_user 'test_user';
|
||||
show grants;
|
||||
select current_user(), current_role();
|
||||
set role test_role1;
|
||||
select * from information_schema.enabled_roles;
|
||||
select current_user(), current_role();
|
||||
--sorted_result
|
||||
show grants;
|
||||
set role none;
|
||||
select * from information_schema.enabled_roles;
|
||||
select current_user(), current_role();
|
||||
--sorted_result
|
||||
show grants;
|
||||
@ -54,6 +56,7 @@ show grants for CURRENT_ROLE;
|
||||
show grants for CURRENT_ROLE();
|
||||
|
||||
set role test_role2;
|
||||
select * from information_schema.enabled_roles;
|
||||
select current_user(), current_role();
|
||||
--sorted_result
|
||||
show grants;
|
||||
|
Reference in New Issue
Block a user