diff options
author | Sergei Golubchik <serg@mariadb.org> | 2018-11-24 14:13:41 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2018-12-12 00:31:44 +0100 |
commit | 4abb8216a054e14afbeb81e8529e02bab6fa14ac (patch) | |
tree | a2e0d28a19ab222edf6bf2e68c26a6df14db05a6 /mysql-test/suite/funcs_1/r | |
parent | d68d7e50f928f7966f21524b4247a0a54d09a6d1 (diff) | |
download | mariadb-git-4abb8216a054e14afbeb81e8529e02bab6fa14ac.tar.gz |
MDEV-17658 change the structure of mysql.user table
Implement User_table_json.
Fix scripts to use mysql.global_priv.
Fix tests.
Diffstat (limited to 'mysql-test/suite/funcs_1/r')
17 files changed, 612 insertions, 1802 deletions
diff --git a/mysql-test/suite/funcs_1/r/is_check_constraints.result b/mysql-test/suite/funcs_1/r/is_check_constraints.result index 678cfb8db2f..eaf90f44544 100644 --- a/mysql-test/suite/funcs_1/r/is_check_constraints.result +++ b/mysql-test/suite/funcs_1/r/is_check_constraints.result @@ -9,6 +9,11 @@ t int, check (t>32) # table constraint ) ENGINE=myisam; SELECT * from information_schema.check_constraints order by check_clause; CONSTRAINT_CATALOG def +CONSTRAINT_SCHEMA mysql +CONSTRAINT_NAME Priv +TABLE_NAME global_priv +CHECK_CLAUSE json_valid(`Priv`) +CONSTRAINT_CATALOG def CONSTRAINT_SCHEMA test CONSTRAINT_NAME CONSTRAINT_1 TABLE_NAME t0 @@ -17,6 +22,11 @@ ALTER TABLE t0 ADD CONSTRAINT CHK_t0_t CHECK(t<100); SELECT * from information_schema.check_constraints order by check_clause; CONSTRAINT_CATALOG def +CONSTRAINT_SCHEMA mysql +CONSTRAINT_NAME Priv +TABLE_NAME global_priv +CHECK_CLAUSE json_valid(`Priv`) +CONSTRAINT_CATALOG def CONSTRAINT_SCHEMA test CONSTRAINT_NAME CHK_t0_t TABLE_NAME t0 @@ -30,6 +40,11 @@ ALTER TABLE t0 DROP CONSTRAINT CHK_t0_t; SELECT * from information_schema.check_constraints order by check_clause; CONSTRAINT_CATALOG def +CONSTRAINT_SCHEMA mysql +CONSTRAINT_NAME Priv +TABLE_NAME global_priv +CHECK_CLAUSE json_valid(`Priv`) +CONSTRAINT_CATALOG def CONSTRAINT_SCHEMA test CONSTRAINT_NAME CONSTRAINT_1 TABLE_NAME t0 @@ -40,6 +55,11 @@ tt int, CONSTRAINT CHK_tt CHECK(tt<100) # table constraint ) ENGINE=InnoDB; SELECT * from information_schema.check_constraints order by check_clause; CONSTRAINT_CATALOG def +CONSTRAINT_SCHEMA mysql +CONSTRAINT_NAME Priv +TABLE_NAME global_priv +CHECK_CLAUSE json_valid(`Priv`) +CONSTRAINT_CATALOG def CONSTRAINT_SCHEMA test CONSTRAINT_NAME CHK_tt TABLE_NAME t1 @@ -58,6 +78,11 @@ ALTER TABLE t1 DROP CONSTRAINT CHK_tt; SELECT * from information_schema.check_constraints order by check_clause; CONSTRAINT_CATALOG def +CONSTRAINT_SCHEMA mysql +CONSTRAINT_NAME Priv +TABLE_NAME global_priv +CHECK_CLAUSE json_valid(`Priv`) +CONSTRAINT_CATALOG def CONSTRAINT_SCHEMA test CONSTRAINT_NAME t TABLE_NAME t1 @@ -81,6 +106,11 @@ CONSTRAINT_NAME name TABLE_NAME t2 CHECK_CLAUSE char_length(`name`) > 2 CONSTRAINT_CATALOG def +CONSTRAINT_SCHEMA mysql +CONSTRAINT_NAME Priv +TABLE_NAME global_priv +CHECK_CLAUSE json_valid(`Priv`) +CONSTRAINT_CATALOG def CONSTRAINT_SCHEMA test CONSTRAINT_NAME CHK_dates TABLE_NAME t2 @@ -104,6 +134,11 @@ CONSTRAINT_NAME name TABLE_NAME t2 CHECK_CLAUSE char_length(`name`) > 2 CONSTRAINT_CATALOG def +CONSTRAINT_SCHEMA mysql +CONSTRAINT_NAME Priv +TABLE_NAME global_priv +CHECK_CLAUSE json_valid(`Priv`) +CONSTRAINT_CATALOG def CONSTRAINT_SCHEMA test CONSTRAINT_NAME CHK_dates TABLE_NAME t2 @@ -132,6 +167,7 @@ CONSTRAINT b check (b>10) # table constraint select * from information_schema.check_constraints order by check_clause; CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_NAME CHECK_CLAUSE def test name t2 char_length(`name`) > 2 +def mysql Priv global_priv json_valid(`Priv`) def test b t3 `b` > 0 def test b t3 `b` > 10 def test CHK_dates t2 `start_date` is null diff --git a/mysql-test/suite/funcs_1/r/is_columns_mysql.result b/mysql-test/suite/funcs_1/r/is_columns_mysql.result index e682a8599c4..31160f8a3ec 100644 --- a/mysql-test/suite/funcs_1/r/is_columns_mysql.result +++ b/mysql-test/suite/funcs_1/r/is_columns_mysql.result @@ -75,6 +75,9 @@ def mysql general_log event_time 1 current_timestamp(6) NO timestamp NULL NULL N def mysql general_log server_id 4 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references NEVER NULL def mysql general_log thread_id 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select,insert,update,references NEVER NULL def mysql general_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references NEVER NULL +def mysql global_priv Host 1 '' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references NEVER NULL +def mysql global_priv Priv 3 '{}' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext select,insert,update,references NEVER NULL +def mysql global_priv User 2 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI select,insert,update,references NEVER NULL def mysql gtid_slave_pos domain_id 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI select,insert,update,references NEVER NULL def mysql gtid_slave_pos seq_no 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL def mysql gtid_slave_pos server_id 3 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references NEVER NULL @@ -206,53 +209,53 @@ def mysql transaction_registry commit_id 2 NULL NO bigint NULL NULL 20 0 NULL NU def mysql transaction_registry commit_timestamp 4 '0000-00-00 00:00:00.000000' NO timestamp NULL NULL NULL NULL 6 NULL NULL timestamp(6) MUL select,insert,update,references NEVER NULL def mysql transaction_registry isolation_level 5 NULL NO enum 16 48 NULL NULL NULL utf8 utf8_bin enum('READ-UNCOMMITTED','READ-COMMITTED','REPEATABLE-READ','SERIALIZABLE') select,insert,update,references NEVER NULL def mysql transaction_registry transaction_id 1 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned PRI select,insert,update,references NEVER NULL -def mysql user Alter_priv 17 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql user Alter_routine_priv 28 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql user authentication_string 43 NULL NO text 65535 65535 NULL NULL NULL utf8 utf8_bin text select,insert,update,references NEVER NULL -def mysql user Create_priv 8 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql user Create_routine_priv 27 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql user Create_tablespace_priv 32 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql user Create_tmp_table_priv 20 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql user Create_user_priv 29 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql user Create_view_priv 25 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql user default_role 46 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) select,insert,update,references NEVER NULL -def mysql user Delete_history_priv 33 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql user Delete_priv 7 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql user Drop_priv 9 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql user Event_priv 30 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql user Execute_priv 22 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql user File_priv 13 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql user Grant_priv 14 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql user Host 1 '' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references NEVER NULL -def mysql user Index_priv 16 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql user Insert_priv 5 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql user is_role 45 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql user Lock_tables_priv 21 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql user max_connections 40 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned select,insert,update,references NEVER NULL -def mysql user max_questions 38 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned select,insert,update,references NEVER NULL +def mysql user Alter_priv 17 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL +def mysql user Alter_routine_priv 28 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL +def mysql user authentication_string 43 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext select,insert,update,references NEVER NULL +def mysql user Create_priv 8 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL +def mysql user Create_routine_priv 27 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL +def mysql user Create_tablespace_priv 32 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL +def mysql user Create_tmp_table_priv 20 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL +def mysql user Create_user_priv 29 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL +def mysql user Create_view_priv 25 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL +def mysql user default_role 46 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext select,insert,update,references NEVER NULL +def mysql user Delete_history_priv 33 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL +def mysql user Delete_priv 7 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL +def mysql user Drop_priv 9 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL +def mysql user Event_priv 30 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL +def mysql user Execute_priv 22 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL +def mysql user File_priv 13 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL +def mysql user Grant_priv 14 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL +def mysql user Host 1 '' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references NEVER NULL +def mysql user Index_priv 16 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL +def mysql user Insert_priv 5 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL +def mysql user is_role 45 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL +def mysql user Lock_tables_priv 21 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL +def mysql user max_connections 40 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL +def mysql user max_questions 38 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL def mysql user max_statement_time 47 0.000000 NO decimal NULL NULL 12 6 NULL NULL NULL decimal(12,6) select,insert,update,references NEVER NULL -def mysql user max_updates 39 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned select,insert,update,references NEVER NULL -def mysql user max_user_connections 41 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL -def mysql user Password 3 '' NO char 41 41 NULL NULL NULL latin1 latin1_bin char(41) select,insert,update,references NEVER NULL -def mysql user password_expired 44 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql user plugin 42 '' NO char 64 64 NULL NULL NULL latin1 latin1_swedish_ci char(64) select,insert,update,references NEVER NULL -def mysql user Process_priv 12 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql user References_priv 15 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql user Reload_priv 10 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql user Repl_client_priv 24 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql user Repl_slave_priv 23 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql user Select_priv 4 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql user Show_db_priv 18 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql user Show_view_priv 26 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql user Shutdown_priv 11 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql user ssl_cipher 35 NULL NO blob 65535 65535 NULL NULL NULL NULL NULL blob select,insert,update,references NEVER NULL -def mysql user ssl_type 34 '' NO enum 9 27 NULL NULL NULL utf8 utf8_general_ci enum('','ANY','X509','SPECIFIED') select,insert,update,references NEVER NULL -def mysql user Super_priv 19 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql user Trigger_priv 31 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql user Update_priv 6 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql user User 2 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI select,insert,update,references NEVER NULL -def mysql user x509_issuer 36 NULL NO blob 65535 65535 NULL NULL NULL NULL NULL blob select,insert,update,references NEVER NULL -def mysql user x509_subject 37 NULL NO blob 65535 65535 NULL NULL NULL NULL NULL blob select,insert,update,references NEVER NULL +def mysql user max_updates 39 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL +def mysql user max_user_connections 41 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select,insert,update,references NEVER NULL +def mysql user Password 3 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext select,insert,update,references NEVER NULL +def mysql user password_expired 44 '' NO varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL +def mysql user plugin 42 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext select,insert,update,references NEVER NULL +def mysql user Process_priv 12 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL +def mysql user References_priv 15 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL +def mysql user Reload_priv 10 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL +def mysql user Repl_client_priv 24 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL +def mysql user Repl_slave_priv 23 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL +def mysql user Select_priv 4 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL +def mysql user Show_db_priv 18 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL +def mysql user Show_view_priv 26 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL +def mysql user Shutdown_priv 11 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL +def mysql user ssl_cipher 35 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext select,insert,update,references NEVER NULL +def mysql user ssl_type 34 NULL YES varchar 9 9 NULL NULL NULL latin1 latin1_swedish_ci varchar(9) select,insert,update,references NEVER NULL +def mysql user Super_priv 19 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL +def mysql user Trigger_priv 31 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL +def mysql user Update_priv 6 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL +def mysql user User 2 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) select,insert,update,references NEVER NULL +def mysql user x509_issuer 36 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext select,insert,update,references NEVER NULL +def mysql user x509_subject 37 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext select,insert,update,references NEVER NULL ########################################################################## # Show the quotient of CHARACTER_OCTET_LENGTH and CHARACTER_MAXIMUM_LENGTH ########################################################################## @@ -269,11 +272,12 @@ COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME 1.0000 blob NULL NULL 1.0000 longblob NULL NULL 1.0000 varbinary NULL NULL -1.0000 char latin1 latin1_bin 1.0000 char latin1 latin1_swedish_ci +1.0000 varchar latin1 latin1_swedish_ci 1.0000 text utf8 utf8_bin 1.0000 mediumtext utf8 utf8_general_ci 1.0000 text utf8 utf8_general_ci +1.0000 longtext utf8mb4 utf8mb4_bin SELECT DISTINCT CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, DATA_TYPE, @@ -398,6 +402,9 @@ NULL mysql general_log thread_id bigint NULL NULL NULL NULL bigint(21) unsigned NULL mysql general_log server_id int NULL NULL NULL NULL int(10) unsigned 3.0000 mysql general_log command_type varchar 64 192 utf8 utf8_general_ci varchar(64) 1.0000 mysql general_log argument mediumtext 16777215 16777215 utf8 utf8_general_ci mediumtext +3.0000 mysql global_priv Host char 60 180 utf8 utf8_bin char(60) +3.0000 mysql global_priv User char 80 240 utf8 utf8_bin char(80) +1.0000 mysql global_priv Priv longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext NULL mysql gtid_slave_pos domain_id int NULL NULL NULL NULL int(10) unsigned NULL mysql gtid_slave_pos sub_id bigint NULL NULL NULL NULL bigint(20) unsigned NULL mysql gtid_slave_pos server_id int NULL NULL NULL NULL int(10) unsigned @@ -531,48 +538,48 @@ NULL mysql transaction_registry commit_timestamp timestamp NULL NULL NULL NULL t 3.0000 mysql transaction_registry isolation_level enum 16 48 utf8 utf8_bin enum('READ-UNCOMMITTED','READ-COMMITTED','REPEATABLE-READ','SERIALIZABLE') 3.0000 mysql user Host char 60 180 utf8 utf8_bin char(60) 3.0000 mysql user User char 80 240 utf8 utf8_bin char(80) -1.0000 mysql user Password char 41 41 latin1 latin1_bin char(41) -3.0000 mysql user Select_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Insert_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Update_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Delete_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Create_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Drop_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Reload_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Shutdown_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Process_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user File_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Grant_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user References_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Index_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Alter_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Show_db_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Super_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Create_tmp_table_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Lock_tables_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Execute_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Repl_slave_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Repl_client_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Create_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Show_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Create_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Alter_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Create_user_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Event_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Trigger_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Create_tablespace_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Delete_history_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user ssl_type enum 9 27 utf8 utf8_general_ci enum('','ANY','X509','SPECIFIED') -1.0000 mysql user ssl_cipher blob 65535 65535 NULL NULL blob -1.0000 mysql user x509_issuer blob 65535 65535 NULL NULL blob -1.0000 mysql user x509_subject blob 65535 65535 NULL NULL blob -NULL mysql user max_questions int NULL NULL NULL NULL int(11) unsigned -NULL mysql user max_updates int NULL NULL NULL NULL int(11) unsigned -NULL mysql user max_connections int NULL NULL NULL NULL int(11) unsigned -NULL mysql user max_user_connections int NULL NULL NULL NULL int(11) -1.0000 mysql user plugin char 64 64 latin1 latin1_swedish_ci char(64) -1.0000 mysql user authentication_string text 65535 65535 utf8 utf8_bin text -3.0000 mysql user password_expired enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user is_role enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user default_role char 80 240 utf8 utf8_bin char(80) +1.0000 mysql user Password longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext +1.0000 mysql user Select_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Insert_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Update_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Delete_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Create_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Drop_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Reload_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Shutdown_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Process_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user File_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Grant_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user References_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Index_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Alter_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Show_db_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Super_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Create_tmp_table_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Lock_tables_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Execute_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Repl_slave_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Repl_client_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Create_view_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Show_view_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Create_routine_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Alter_routine_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Create_user_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Event_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Trigger_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Create_tablespace_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Delete_history_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user ssl_type varchar 9 9 latin1 latin1_swedish_ci varchar(9) +1.0000 mysql user ssl_cipher longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext +1.0000 mysql user x509_issuer longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext +1.0000 mysql user x509_subject longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext +NULL mysql user max_questions bigint NULL NULL NULL NULL bigint(20) unsigned +NULL mysql user max_updates bigint NULL NULL NULL NULL bigint(20) unsigned +NULL mysql user max_connections bigint NULL NULL NULL NULL bigint(20) unsigned +NULL mysql user max_user_connections bigint NULL NULL NULL NULL bigint(21) +1.0000 mysql user plugin longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext +1.0000 mysql user authentication_string longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext +1.0000 mysql user password_expired varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user is_role varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user default_role longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext NULL mysql user max_statement_time decimal NULL NULL NULL NULL decimal(12,6) diff --git a/mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result b/mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result index d5af88994f6..6ad671a54c8 100644 --- a/mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result +++ b/mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result @@ -75,6 +75,9 @@ def mysql general_log event_time 1 current_timestamp(6) NO timestamp NULL NULL N def mysql general_log server_id 4 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned NEVER NULL def mysql general_log thread_id 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL def mysql general_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NULL NULL utf8 utf8_general_ci mediumtext NEVER NULL +def mysql global_priv Host 1 '' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) PRI NEVER NULL +def mysql global_priv Priv 3 '{}' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext NEVER NULL +def mysql global_priv User 2 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI NEVER NULL def mysql gtid_slave_pos domain_id 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI NEVER NULL def mysql gtid_slave_pos seq_no 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned NEVER NULL def mysql gtid_slave_pos server_id 3 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned NEVER NULL @@ -187,53 +190,53 @@ def mysql time_zone_transition_type Is_DST 4 0 NO tinyint NULL NULL 3 0 NULL NUL def mysql time_zone_transition_type Offset 3 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) NEVER NULL def mysql time_zone_transition_type Time_zone_id 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI NEVER NULL def mysql time_zone_transition_type Transition_type_id 2 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI NEVER NULL -def mysql user Alter_priv 17 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql user Alter_routine_priv 28 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql user authentication_string 43 NULL NO text 65535 65535 NULL NULL NULL utf8 utf8_bin text NEVER NULL -def mysql user Create_priv 8 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql user Create_routine_priv 27 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql user Create_tablespace_priv 32 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql user Create_tmp_table_priv 20 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql user Create_user_priv 29 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql user Create_view_priv 25 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql user default_role 46 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) NEVER NULL -def mysql user Delete_history_priv 33 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql user Delete_priv 7 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql user Drop_priv 9 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql user Event_priv 30 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql user Execute_priv 22 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql user File_priv 13 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql user Grant_priv 14 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql user Host 1 '' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) PRI NEVER NULL -def mysql user Index_priv 16 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql user Insert_priv 5 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql user is_role 45 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql user Lock_tables_priv 21 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql user max_connections 40 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned NEVER NULL -def mysql user max_questions 38 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned NEVER NULL +def mysql user Alter_priv 17 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL +def mysql user Alter_routine_priv 28 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL +def mysql user authentication_string 43 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext NEVER NULL +def mysql user Create_priv 8 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL +def mysql user Create_routine_priv 27 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL +def mysql user Create_tablespace_priv 32 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL +def mysql user Create_tmp_table_priv 20 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL +def mysql user Create_user_priv 29 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL +def mysql user Create_view_priv 25 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL +def mysql user default_role 46 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext NEVER NULL +def mysql user Delete_history_priv 33 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL +def mysql user Delete_priv 7 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL +def mysql user Drop_priv 9 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL +def mysql user Event_priv 30 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL +def mysql user Execute_priv 22 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL +def mysql user File_priv 13 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL +def mysql user Grant_priv 14 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL +def mysql user Host 1 '' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) NEVER NULL +def mysql user Index_priv 16 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL +def mysql user Insert_priv 5 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL +def mysql user is_role 45 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL +def mysql user Lock_tables_priv 21 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL +def mysql user max_connections 40 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned NEVER NULL +def mysql user max_questions 38 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned NEVER NULL def mysql user max_statement_time 47 0.000000 NO decimal NULL NULL 12 6 NULL NULL NULL decimal(12,6) NEVER NULL -def mysql user max_updates 39 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned NEVER NULL -def mysql user max_user_connections 41 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) NEVER NULL -def mysql user Password 3 '' NO char 41 41 NULL NULL NULL latin1 latin1_bin char(41) NEVER NULL -def mysql user password_expired 44 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql user plugin 42 '' NO char 64 64 NULL NULL NULL latin1 latin1_swedish_ci char(64) NEVER NULL -def mysql user Process_priv 12 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql user References_priv 15 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql user Reload_priv 10 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql user Repl_client_priv 24 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql user Repl_slave_priv 23 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql user Select_priv 4 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql user Show_db_priv 18 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql user Show_view_priv 26 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql user Shutdown_priv 11 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql user ssl_cipher 35 NULL NO blob 65535 65535 NULL NULL NULL NULL NULL blob NEVER NULL -def mysql user ssl_type 34 '' NO enum 9 27 NULL NULL NULL utf8 utf8_general_ci enum('','ANY','X509','SPECIFIED') NEVER NULL -def mysql user Super_priv 19 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql user Trigger_priv 31 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql user Update_priv 6 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql user User 2 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI NEVER NULL -def mysql user x509_issuer 36 NULL NO blob 65535 65535 NULL NULL NULL NULL NULL blob NEVER NULL -def mysql user x509_subject 37 NULL NO blob 65535 65535 NULL NULL NULL NULL NULL blob NEVER NULL +def mysql user max_updates 39 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned NEVER NULL +def mysql user max_user_connections 41 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL +def mysql user Password 3 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext NEVER NULL +def mysql user password_expired 44 '' NO varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL +def mysql user plugin 42 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext NEVER NULL +def mysql user Process_priv 12 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL +def mysql user References_priv 15 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL +def mysql user Reload_priv 10 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL +def mysql user Repl_client_priv 24 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL +def mysql user Repl_slave_priv 23 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL +def mysql user Select_priv 4 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL +def mysql user Show_db_priv 18 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL +def mysql user Show_view_priv 26 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL +def mysql user Shutdown_priv 11 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL +def mysql user ssl_cipher 35 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext NEVER NULL +def mysql user ssl_type 34 NULL YES varchar 9 9 NULL NULL NULL latin1 latin1_swedish_ci varchar(9) NEVER NULL +def mysql user Super_priv 19 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL +def mysql user Trigger_priv 31 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL +def mysql user Update_priv 6 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL +def mysql user User 2 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) NEVER NULL +def mysql user x509_issuer 36 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext NEVER NULL +def mysql user x509_subject 37 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext NEVER NULL Warnings: Warning 1286 Unknown storage engine 'InnoDB' Warning 1286 Unknown storage engine 'InnoDB' @@ -254,11 +257,12 @@ COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME 1.0000 blob NULL NULL 1.0000 longblob NULL NULL 1.0000 varbinary NULL NULL -1.0000 char latin1 latin1_bin 1.0000 char latin1 latin1_swedish_ci +1.0000 varchar latin1 latin1_swedish_ci 1.0000 text utf8 utf8_bin 1.0000 mediumtext utf8 utf8_general_ci 1.0000 text utf8 utf8_general_ci +1.0000 longtext utf8mb4 utf8mb4_bin Warnings: Warning 1286 Unknown storage engine 'InnoDB' Warning 1286 Unknown storage engine 'InnoDB' @@ -395,6 +399,9 @@ NULL mysql general_log thread_id bigint NULL NULL NULL NULL bigint(21) unsigned NULL mysql general_log server_id int NULL NULL NULL NULL int(10) unsigned 3.0000 mysql general_log command_type varchar 64 192 utf8 utf8_general_ci varchar(64) 1.0000 mysql general_log argument mediumtext 16777215 16777215 utf8 utf8_general_ci mediumtext +3.0000 mysql global_priv Host char 60 180 utf8 utf8_bin char(60) +3.0000 mysql global_priv User char 80 240 utf8 utf8_bin char(80) +1.0000 mysql global_priv Priv longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext NULL mysql gtid_slave_pos domain_id int NULL NULL NULL NULL int(10) unsigned NULL mysql gtid_slave_pos sub_id bigint NULL NULL NULL NULL bigint(20) unsigned NULL mysql gtid_slave_pos server_id int NULL NULL NULL NULL int(10) unsigned @@ -509,50 +516,50 @@ NULL mysql time_zone_transition_type Is_DST tinyint NULL NULL NULL NULL tinyint( 3.0000 mysql time_zone_transition_type Abbreviation char 8 24 utf8 utf8_general_ci char(8) 3.0000 mysql user Host char 60 180 utf8 utf8_bin char(60) 3.0000 mysql user User char 80 240 utf8 utf8_bin char(80) -1.0000 mysql user Password char 41 41 latin1 latin1_bin char(41) -3.0000 mysql user Select_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Insert_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Update_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Delete_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Create_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Drop_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Reload_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Shutdown_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Process_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user File_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Grant_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user References_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Index_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Alter_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Show_db_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Super_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Create_tmp_table_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Lock_tables_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Execute_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Repl_slave_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Repl_client_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Create_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Show_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Create_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Alter_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Create_user_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Event_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Trigger_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Create_tablespace_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Delete_history_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user ssl_type enum 9 27 utf8 utf8_general_ci enum('','ANY','X509','SPECIFIED') -1.0000 mysql user ssl_cipher blob 65535 65535 NULL NULL blob -1.0000 mysql user x509_issuer blob 65535 65535 NULL NULL blob -1.0000 mysql user x509_subject blob 65535 65535 NULL NULL blob -NULL mysql user max_questions int NULL NULL NULL NULL int(11) unsigned -NULL mysql user max_updates int NULL NULL NULL NULL int(11) unsigned -NULL mysql user max_connections int NULL NULL NULL NULL int(11) unsigned -NULL mysql user max_user_connections int NULL NULL NULL NULL int(11) -1.0000 mysql user plugin char 64 64 latin1 latin1_swedish_ci char(64) -1.0000 mysql user authentication_string text 65535 65535 utf8 utf8_bin text -3.0000 mysql user password_expired enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user is_role enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user default_role char 80 240 utf8 utf8_bin char(80) +1.0000 mysql user Password longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext +1.0000 mysql user Select_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Insert_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Update_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Delete_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Create_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Drop_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Reload_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Shutdown_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Process_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user File_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Grant_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user References_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Index_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Alter_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Show_db_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Super_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Create_tmp_table_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Lock_tables_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Execute_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Repl_slave_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Repl_client_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Create_view_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Show_view_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Create_routine_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Alter_routine_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Create_user_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Event_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Trigger_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Create_tablespace_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user Delete_history_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user ssl_type varchar 9 9 latin1 latin1_swedish_ci varchar(9) +1.0000 mysql user ssl_cipher longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext +1.0000 mysql user x509_issuer longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext +1.0000 mysql user x509_subject longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext +NULL mysql user max_questions bigint NULL NULL NULL NULL bigint(20) unsigned +NULL mysql user max_updates bigint NULL NULL NULL NULL bigint(20) unsigned +NULL mysql user max_connections bigint NULL NULL NULL NULL bigint(20) unsigned +NULL mysql user max_user_connections bigint NULL NULL NULL NULL bigint(21) +1.0000 mysql user plugin longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext +1.0000 mysql user authentication_string longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext +1.0000 mysql user password_expired varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user is_role varchar 1 1 latin1 latin1_swedish_ci varchar(1) +1.0000 mysql user default_role longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext NULL mysql user max_statement_time decimal NULL NULL NULL NULL decimal(12,6) Warnings: Warning 1286 Unknown storage engine 'InnoDB' diff --git a/mysql-test/suite/funcs_1/r/is_key_column_usage.result b/mysql-test/suite/funcs_1/r/is_key_column_usage.result index 326ea3f4acc..efb67e32cee 100644 --- a/mysql-test/suite/funcs_1/r/is_key_column_usage.result +++ b/mysql-test/suite/funcs_1/r/is_key_column_usage.result @@ -90,6 +90,8 @@ def mysql PRIMARY def mysql db User def mysql PRIMARY def mysql event db def mysql PRIMARY def mysql event name def mysql PRIMARY def mysql func name +def mysql PRIMARY def mysql global_priv Host +def mysql PRIMARY def mysql global_priv User def mysql PRIMARY def mysql gtid_slave_pos domain_id def mysql PRIMARY def mysql gtid_slave_pos sub_id def mysql PRIMARY def mysql help_category help_category_id @@ -142,8 +144,6 @@ def mysql PRIMARY def mysql time_zone_transition_type Time_zone_id def mysql PRIMARY def mysql time_zone_transition_type Transition_type_id def mysql commit_id def mysql transaction_registry commit_id def mysql PRIMARY def mysql transaction_registry transaction_id -def mysql PRIMARY def mysql user Host -def mysql PRIMARY def mysql user User ######################################################################################## # Testcase 3.2.7.2 + 3.2.7.3: INFORMATION_SCHEMA.KEY_COLUMN_USAGE accessible information ######################################################################################## diff --git a/mysql-test/suite/funcs_1/r/is_key_column_usage_embedded.result b/mysql-test/suite/funcs_1/r/is_key_column_usage_embedded.result index a547b1ddf61..cf67be8f7a0 100644 --- a/mysql-test/suite/funcs_1/r/is_key_column_usage_embedded.result +++ b/mysql-test/suite/funcs_1/r/is_key_column_usage_embedded.result @@ -90,6 +90,8 @@ def mysql PRIMARY def mysql db User def mysql PRIMARY def mysql event db def mysql PRIMARY def mysql event name def mysql PRIMARY def mysql func name +def mysql PRIMARY def mysql global_priv Host +def mysql PRIMARY def mysql global_priv User def mysql PRIMARY def mysql gtid_slave_pos domain_id def mysql PRIMARY def mysql gtid_slave_pos sub_id def mysql PRIMARY def mysql help_category help_category_id @@ -142,8 +144,6 @@ def mysql PRIMARY def mysql time_zone_transition_type Time_zone_id def mysql PRIMARY def mysql time_zone_transition_type Transition_type_id def mysql commit_id def mysql transaction_registry commit_id def mysql PRIMARY def mysql transaction_registry transaction_id -def mysql PRIMARY def mysql user Host -def mysql PRIMARY def mysql user User ######################################################################################## # Testcase 3.2.7.2 + 3.2.7.3: INFORMATION_SCHEMA.KEY_COLUMN_USAGE accessible information ######################################################################################## diff --git a/mysql-test/suite/funcs_1/r/is_routines_embedded.result b/mysql-test/suite/funcs_1/r/is_routines_embedded.result index cb736417a17..ec375e9c5f6 100644 --- a/mysql-test/suite/funcs_1/r/is_routines_embedded.result +++ b/mysql-test/suite/funcs_1/r/is_routines_embedded.result @@ -197,7 +197,7 @@ sp_6_408002_2 def db_datadict_2 sp_6_408002_2 PROCEDURE NULL NULL NULL NULL NUL SELECT * FROM db_datadict_2.res_6_408002_2; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost latin1 latin1_swedish_ci latin1_swedish_ci add_suppression def mtr add_suppression PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN INSERT INTO test_suppressions (pattern) VALUES (pattern); FLUSH NO_WRITE_TO_BINLOG TABLE test_suppressions; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci -check_testcase def mtr check_testcase PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name NOT IN ('timestamp') AND variable_name not like "Last_IO_Err*" AND variable_name != 'INNODB_IBUF_MAX_SIZE' AND variable_name != 'INNODB_USE_NATIVE_AIO' AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP' AND variable_name not like 'GTID%POS' AND variable_name != 'GTID_BINLOG_STATE' ORDER BY variable_name; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY BINARY SCHEMA_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('mtr_wsrep_notify', 'wsrep_schema') ORDER BY BINARY SCHEMA_NAME; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' ORDER BY columns_in_mysql; SELECT * FROM INFORMATION_SCHEMA.EVENTS; SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME NOT IN ('gs_insert', 'ts_insert'); SELECT * FROM INFORMATION_SCHEMA.ROUTINES; SHOW STATUS LIKE 'slave_open_temp_tables'; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.plugin, mysql.proc, mysql.procs_priv, mysql.roles_mapping, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.user; SELECT * FROM INFORMATION_SCHEMA.PLUGINS; select * from information_schema.session_variables where variable_name = 'debug_sync'; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci +check_testcase def mtr check_testcase PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name NOT IN ('timestamp') AND variable_name not like "Last_IO_Err*" AND variable_name != 'INNODB_IBUF_MAX_SIZE' AND variable_name != 'INNODB_USE_NATIVE_AIO' AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP' AND variable_name not like 'GTID%POS' AND variable_name != 'GTID_BINLOG_STATE' ORDER BY variable_name; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY BINARY SCHEMA_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('mtr_wsrep_notify', 'wsrep_schema') ORDER BY BINARY SCHEMA_NAME; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' ORDER BY columns_in_mysql; SELECT * FROM INFORMATION_SCHEMA.EVENTS; SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME NOT IN ('gs_insert', 'ts_insert'); SELECT * FROM INFORMATION_SCHEMA.ROUTINES; SHOW STATUS LIKE 'slave_open_temp_tables'; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.plugin, mysql.proc, mysql.procs_priv, mysql.roles_mapping, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.global_priv; SELECT * FROM INFORMATION_SCHEMA.PLUGINS; select * from information_schema.session_variables where variable_name = 'debug_sync'; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci check_warnings def mtr check_warnings PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN DECLARE `pos` bigint unsigned; SET SQL_LOG_BIN=0, SQL_SAFE_UPDATES=0; UPDATE error_log el, global_suppressions gs SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP gs.pattern; UPDATE error_log el, test_suppressions ts SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP ts.pattern; SELECT COUNT(*) INTO @num_warnings FROM error_log WHERE suspicious=1; IF @num_warnings > 0 THEN SELECT line FROM error_log WHERE suspicious=1; SELECT 2 INTO result; ELSE SELECT 0 INTO RESULT; END IF; TRUNCATE test_suppressions; DROP TABLE error_log; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci connect testuser2, localhost, testuser2, , db_datadict; SELECT * FROM information_schema.routines; @@ -209,7 +209,7 @@ sp_6_408002_2 def db_datadict_2 sp_6_408002_2 PROCEDURE NULL NULL NULL NULL NUL SELECT * FROM db_datadict_2.res_6_408002_2; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost latin1 latin1_swedish_ci latin1_swedish_ci add_suppression def mtr add_suppression PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN INSERT INTO test_suppressions (pattern) VALUES (pattern); FLUSH NO_WRITE_TO_BINLOG TABLE test_suppressions; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci -check_testcase def mtr check_testcase PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name NOT IN ('timestamp') AND variable_name not like "Last_IO_Err*" AND variable_name != 'INNODB_IBUF_MAX_SIZE' AND variable_name != 'INNODB_USE_NATIVE_AIO' AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP' AND variable_name not like 'GTID%POS' AND variable_name != 'GTID_BINLOG_STATE' ORDER BY variable_name; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY BINARY SCHEMA_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('mtr_wsrep_notify', 'wsrep_schema') ORDER BY BINARY SCHEMA_NAME; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' ORDER BY columns_in_mysql; SELECT * FROM INFORMATION_SCHEMA.EVENTS; SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME NOT IN ('gs_insert', 'ts_insert'); SELECT * FROM INFORMATION_SCHEMA.ROUTINES; SHOW STATUS LIKE 'slave_open_temp_tables'; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.plugin, mysql.proc, mysql.procs_priv, mysql.roles_mapping, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.user; SELECT * FROM INFORMATION_SCHEMA.PLUGINS; select * from information_schema.session_variables where variable_name = 'debug_sync'; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci +check_testcase def mtr check_testcase PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name NOT IN ('timestamp') AND variable_name not like "Last_IO_Err*" AND variable_name != 'INNODB_IBUF_MAX_SIZE' AND variable_name != 'INNODB_USE_NATIVE_AIO' AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP' AND variable_name not like 'GTID%POS' AND variable_name != 'GTID_BINLOG_STATE' ORDER BY variable_name; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY BINARY SCHEMA_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('mtr_wsrep_notify', 'wsrep_schema') ORDER BY BINARY SCHEMA_NAME; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' ORDER BY columns_in_mysql; SELECT * FROM INFORMATION_SCHEMA.EVENTS; SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME NOT IN ('gs_insert', 'ts_insert'); SELECT * FROM INFORMATION_SCHEMA.ROUTINES; SHOW STATUS LIKE 'slave_open_temp_tables'; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.plugin, mysql.proc, mysql.procs_priv, mysql.roles_mapping, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.global_priv; SELECT * FROM INFORMATION_SCHEMA.PLUGINS; select * from information_schema.session_variables where variable_name = 'debug_sync'; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci check_warnings def mtr check_warnings PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN DECLARE `pos` bigint unsigned; SET SQL_LOG_BIN=0, SQL_SAFE_UPDATES=0; UPDATE error_log el, global_suppressions gs SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP gs.pattern; UPDATE error_log el, test_suppressions ts SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP ts.pattern; SELECT COUNT(*) INTO @num_warnings FROM error_log WHERE suspicious=1; IF @num_warnings > 0 THEN SELECT line FROM error_log WHERE suspicious=1; SELECT 2 INTO result; ELSE SELECT 0 INTO RESULT; END IF; TRUNCATE test_suppressions; DROP TABLE error_log; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci connect testuser3, localhost, testuser3, , test; SELECT * FROM information_schema.routines; @@ -221,7 +221,7 @@ sp_6_408002_2 def db_datadict_2 sp_6_408002_2 PROCEDURE NULL NULL NULL NULL NUL SELECT * FROM db_datadict_2.res_6_408002_2; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost latin1 latin1_swedish_ci latin1_swedish_ci add_suppression def mtr add_suppression PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN INSERT INTO test_suppressions (pattern) VALUES (pattern); FLUSH NO_WRITE_TO_BINLOG TABLE test_suppressions; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci -check_testcase def mtr check_testcase PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name NOT IN ('timestamp') AND variable_name not like "Last_IO_Err*" AND variable_name != 'INNODB_IBUF_MAX_SIZE' AND variable_name != 'INNODB_USE_NATIVE_AIO' AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP' AND variable_name not like 'GTID%POS' AND variable_name != 'GTID_BINLOG_STATE' ORDER BY variable_name; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY BINARY SCHEMA_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('mtr_wsrep_notify', 'wsrep_schema') ORDER BY BINARY SCHEMA_NAME; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' ORDER BY columns_in_mysql; SELECT * FROM INFORMATION_SCHEMA.EVENTS; SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME NOT IN ('gs_insert', 'ts_insert'); SELECT * FROM INFORMATION_SCHEMA.ROUTINES; SHOW STATUS LIKE 'slave_open_temp_tables'; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.plugin, mysql.proc, mysql.procs_priv, mysql.roles_mapping, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.user; SELECT * FROM INFORMATION_SCHEMA.PLUGINS; select * from information_schema.session_variables where variable_name = 'debug_sync'; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci +check_testcase def mtr check_testcase PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name NOT IN ('timestamp') AND variable_name not like "Last_IO_Err*" AND variable_name != 'INNODB_IBUF_MAX_SIZE' AND variable_name != 'INNODB_USE_NATIVE_AIO' AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP' AND variable_name not like 'GTID%POS' AND variable_name != 'GTID_BINLOG_STATE' ORDER BY variable_name; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY BINARY SCHEMA_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('mtr_wsrep_notify', 'wsrep_schema') ORDER BY BINARY SCHEMA_NAME; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' ORDER BY columns_in_mysql; SELECT * FROM INFORMATION_SCHEMA.EVENTS; SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME NOT IN ('gs_insert', 'ts_insert'); SELECT * FROM INFORMATION_SCHEMA.ROUTINES; SHOW STATUS LIKE 'slave_open_temp_tables'; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.plugin, mysql.proc, mysql.procs_priv, mysql.roles_mapping, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.global_priv; SELECT * FROM INFORMATION_SCHEMA.PLUGINS; select * from information_schema.session_variables where variable_name = 'debug_sync'; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci check_warnings def mtr check_warnings PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN DECLARE `pos` bigint unsigned; SET SQL_LOG_BIN=0, SQL_SAFE_UPDATES=0; UPDATE error_log el, global_suppressions gs SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP gs.pattern; UPDATE error_log el, test_suppressions ts SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP ts.pattern; SELECT COUNT(*) INTO @num_warnings FROM error_log WHERE suspicious=1; IF @num_warnings > 0 THEN SELECT line FROM error_log WHERE suspicious=1; SELECT 2 INTO result; ELSE SELECT 0 INTO RESULT; END IF; TRUNCATE test_suppressions; DROP TABLE error_log; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci connection default; disconnect testuser1; diff --git a/mysql-test/suite/funcs_1/r/is_statistics.result b/mysql-test/suite/funcs_1/r/is_statistics.result index 2cb94b657cc..bacc106a1be 100644 --- a/mysql-test/suite/funcs_1/r/is_statistics.result +++ b/mysql-test/suite/funcs_1/r/is_statistics.result @@ -101,6 +101,8 @@ def mysql db mysql User def mysql event mysql PRIMARY def mysql event mysql PRIMARY def mysql func mysql PRIMARY +def mysql global_priv mysql PRIMARY +def mysql global_priv mysql PRIMARY def mysql gtid_slave_pos mysql PRIMARY def mysql gtid_slave_pos mysql PRIMARY def mysql help_category mysql name @@ -148,8 +150,6 @@ def mysql time_zone_transition mysql PRIMARY def mysql time_zone_transition mysql PRIMARY def mysql time_zone_transition_type mysql PRIMARY def mysql time_zone_transition_type mysql PRIMARY -def mysql user mysql PRIMARY -def mysql user mysql PRIMARY Warnings: Warning 1286 Unknown storage engine 'InnoDB' Warning 1286 Unknown storage engine 'InnoDB' diff --git a/mysql-test/suite/funcs_1/r/is_statistics_mysql.result b/mysql-test/suite/funcs_1/r/is_statistics_mysql.result index 96d85a0425f..c01c456edf8 100644 --- a/mysql-test/suite/funcs_1/r/is_statistics_mysql.result +++ b/mysql-test/suite/funcs_1/r/is_statistics_mysql.result @@ -22,6 +22,8 @@ def mysql db 1 mysql User 1 User A #CARD# NULL NULL BTREE def mysql event 0 mysql PRIMARY 1 db A #CARD# NULL NULL BTREE def mysql event 0 mysql PRIMARY 2 name A #CARD# NULL NULL BTREE def mysql func 0 mysql PRIMARY 1 name A #CARD# NULL NULL BTREE +def mysql global_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE +def mysql global_priv 0 mysql PRIMARY 2 User A #CARD# NULL NULL BTREE def mysql gtid_slave_pos 0 mysql PRIMARY 1 domain_id A #CARD# NULL NULL BTREE def mysql gtid_slave_pos 0 mysql PRIMARY 2 sub_id A #CARD# NULL NULL BTREE def mysql help_category 0 mysql name 1 name A #CARD# NULL NULL BTREE @@ -80,8 +82,6 @@ def mysql transaction_registry 0 mysql commit_id 1 commit_id A #CARD# NULL NULL def mysql transaction_registry 1 mysql commit_timestamp 1 commit_timestamp A #CARD# NULL NULL BTREE def mysql transaction_registry 1 mysql commit_timestamp 2 transaction_id A #CARD# NULL NULL BTREE def mysql transaction_registry 0 mysql PRIMARY 1 transaction_id A #CARD# NULL NULL BTREE -def mysql user 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE -def mysql user 0 mysql PRIMARY 2 User A #CARD# NULL NULL BTREE connect testuser1,localhost,testuser1,,db_datadict; SELECT * FROM information_schema.statistics WHERE table_schema = 'mysql' diff --git a/mysql-test/suite/funcs_1/r/is_statistics_mysql_embedded.result b/mysql-test/suite/funcs_1/r/is_statistics_mysql_embedded.result index 69a502e53dd..b7bd3ec2e23 100644 --- a/mysql-test/suite/funcs_1/r/is_statistics_mysql_embedded.result +++ b/mysql-test/suite/funcs_1/r/is_statistics_mysql_embedded.result @@ -22,6 +22,8 @@ def mysql db 1 mysql User 1 User A #CARD# NULL NULL BTREE def mysql event 0 mysql PRIMARY 1 db A #CARD# NULL NULL BTREE def mysql event 0 mysql PRIMARY 2 name A #CARD# NULL NULL BTREE def mysql func 0 mysql PRIMARY 1 name A #CARD# NULL NULL BTREE +def mysql global_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE +def mysql global_priv 0 mysql PRIMARY 2 User A #CARD# NULL NULL BTREE def mysql gtid_slave_pos 0 mysql PRIMARY 1 domain_id A #CARD# NULL NULL BTREE def mysql gtid_slave_pos 0 mysql PRIMARY 2 sub_id A #CARD# NULL NULL BTREE def mysql help_category 0 mysql name 1 name A #CARD# NULL NULL BTREE @@ -80,8 +82,6 @@ def mysql transaction_registry 0 mysql commit_id 1 commit_id A #CARD# NULL NULL def mysql transaction_registry 1 mysql commit_timestamp 1 commit_timestamp A #CARD# NULL NULL BTREE def mysql transaction_registry 1 mysql commit_timestamp 2 transaction_id A #CARD# NULL NULL BTREE def mysql transaction_registry 0 mysql PRIMARY 1 transaction_id A #CARD# NULL NULL BTREE -def mysql user 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE -def mysql user 0 mysql PRIMARY 2 User A #CARD# NULL NULL BTREE connect testuser1,localhost,testuser1,,db_datadict; SELECT * FROM information_schema.statistics WHERE table_schema = 'mysql' @@ -102,6 +102,8 @@ def mysql db 1 mysql User 1 User A #CARD# NULL NULL BTREE def mysql event 0 mysql PRIMARY 1 db A #CARD# NULL NULL BTREE def mysql event 0 mysql PRIMARY 2 name A #CARD# NULL NULL BTREE def mysql func 0 mysql PRIMARY 1 name A #CARD# NULL NULL BTREE +def mysql global_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE +def mysql global_priv 0 mysql PRIMARY 2 User A #CARD# NULL NULL BTREE def mysql gtid_slave_pos 0 mysql PRIMARY 1 domain_id A #CARD# NULL NULL BTREE def mysql gtid_slave_pos 0 mysql PRIMARY 2 sub_id A #CARD# NULL NULL BTREE def mysql help_category 0 mysql name 1 name A #CARD# NULL NULL BTREE @@ -160,8 +162,6 @@ def mysql transaction_registry 0 mysql commit_id 1 commit_id A #CARD# NULL NULL def mysql transaction_registry 1 mysql commit_timestamp 1 commit_timestamp A #CARD# NULL NULL BTREE def mysql transaction_registry 1 mysql commit_timestamp 2 transaction_id A #CARD# NULL NULL BTREE def mysql transaction_registry 0 mysql PRIMARY 1 transaction_id A #CARD# NULL NULL BTREE -def mysql user 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE -def mysql user 0 mysql PRIMARY 2 User A #CARD# NULL NULL BTREE connection default; disconnect testuser1; DROP USER testuser1@localhost; diff --git a/mysql-test/suite/funcs_1/r/is_table_constraints.result b/mysql-test/suite/funcs_1/r/is_table_constraints.result index cb7aa1f8fc0..bc0f9a724a1 100644 --- a/mysql-test/suite/funcs_1/r/is_table_constraints.result +++ b/mysql-test/suite/funcs_1/r/is_table_constraints.result @@ -63,6 +63,8 @@ def mysql PRIMARY mysql column_stats def mysql PRIMARY mysql db def mysql PRIMARY mysql event def mysql PRIMARY mysql func +def mysql PRIMARY mysql global_priv +def mysql Priv mysql global_priv def mysql PRIMARY mysql gtid_slave_pos def mysql name mysql help_category def mysql PRIMARY mysql help_category @@ -89,7 +91,6 @@ def mysql PRIMARY mysql time_zone_transition def mysql PRIMARY mysql time_zone_transition_type def mysql commit_id mysql transaction_registry def mysql PRIMARY mysql transaction_registry -def mysql PRIMARY mysql user ######################################################################################### # Testcase 3.2.7.2 + 3.2.7.3: INFORMATION_SCHEMA.TABLE_CONSTRAINTS accessible information ######################################################################################### diff --git a/mysql-test/suite/funcs_1/r/is_table_constraints_mysql.result b/mysql-test/suite/funcs_1/r/is_table_constraints_mysql.result index fc9ba660467..d5da807388b 100644 --- a/mysql-test/suite/funcs_1/r/is_table_constraints_mysql.result +++ b/mysql-test/suite/funcs_1/r/is_table_constraints_mysql.result @@ -12,6 +12,8 @@ def mysql PRIMARY mysql column_stats PRIMARY KEY def mysql PRIMARY mysql db PRIMARY KEY def mysql PRIMARY mysql event PRIMARY KEY def mysql PRIMARY mysql func PRIMARY KEY +def mysql PRIMARY mysql global_priv PRIMARY KEY +def mysql Priv mysql global_priv CHECK def mysql PRIMARY mysql gtid_slave_pos PRIMARY KEY def mysql name mysql help_category UNIQUE def mysql PRIMARY mysql help_category PRIMARY KEY @@ -38,7 +40,6 @@ def mysql PRIMARY mysql time_zone_transition PRIMARY KEY def mysql PRIMARY mysql time_zone_transition_type PRIMARY KEY def mysql commit_id mysql transaction_registry UNIQUE def mysql PRIMARY mysql transaction_registry PRIMARY KEY -def mysql PRIMARY mysql user PRIMARY KEY connect testuser1,localhost,testuser1,,db_datadict; SELECT * FROM information_schema.table_constraints WHERE table_schema = 'mysql' diff --git a/mysql-test/suite/funcs_1/r/is_table_constraints_mysql_embedded.result b/mysql-test/suite/funcs_1/r/is_table_constraints_mysql_embedded.result index 54e27e22140..0426877bc1c 100644 --- a/mysql-test/suite/funcs_1/r/is_table_constraints_mysql_embedded.result +++ b/mysql-test/suite/funcs_1/r/is_table_constraints_mysql_embedded.result @@ -12,6 +12,8 @@ def mysql PRIMARY mysql column_stats PRIMARY KEY def mysql PRIMARY mysql db PRIMARY KEY def mysql PRIMARY mysql event PRIMARY KEY def mysql PRIMARY mysql func PRIMARY KEY +def mysql PRIMARY mysql global_priv PRIMARY KEY +def mysql Priv mysql global_priv CHECK def mysql PRIMARY mysql gtid_slave_pos PRIMARY KEY def mysql name mysql help_category UNIQUE def mysql PRIMARY mysql help_category PRIMARY KEY @@ -38,7 +40,6 @@ def mysql PRIMARY mysql time_zone_transition PRIMARY KEY def mysql PRIMARY mysql time_zone_transition_type PRIMARY KEY def mysql commit_id mysql transaction_registry UNIQUE def mysql PRIMARY mysql transaction_registry PRIMARY KEY -def mysql PRIMARY mysql user PRIMARY KEY connect testuser1,localhost,testuser1,,db_datadict; SELECT * FROM information_schema.table_constraints WHERE table_schema = 'mysql' @@ -49,6 +50,8 @@ def mysql PRIMARY mysql column_stats PRIMARY KEY def mysql PRIMARY mysql db PRIMARY KEY def mysql PRIMARY mysql event PRIMARY KEY def mysql PRIMARY mysql func PRIMARY KEY +def mysql PRIMARY mysql global_priv PRIMARY KEY +def mysql Priv mysql global_priv CHECK def mysql PRIMARY mysql gtid_slave_pos PRIMARY KEY def mysql name mysql help_category UNIQUE def mysql PRIMARY mysql help_category PRIMARY KEY @@ -75,7 +78,6 @@ def mysql PRIMARY mysql time_zone_transition PRIMARY KEY def mysql PRIMARY mysql time_zone_transition_type PRIMARY KEY def mysql commit_id mysql transaction_registry UNIQUE def mysql PRIMARY mysql transaction_registry PRIMARY KEY -def mysql PRIMARY mysql user PRIMARY KEY connection default; disconnect testuser1; DROP USER testuser1@localhost; diff --git a/mysql-test/suite/funcs_1/r/is_tables_mysql.result b/mysql-test/suite/funcs_1/r/is_tables_mysql.result index 9d1539bc778..be432e2422a 100644 --- a/mysql-test/suite/funcs_1/r/is_tables_mysql.result +++ b/mysql-test/suite/funcs_1/r/is_tables_mysql.result @@ -162,6 +162,31 @@ user_comment General log Separator ----------------------------------------------------- TABLE_CATALOG def TABLE_SCHEMA mysql +TABLE_NAME global_priv +TABLE_TYPE BASE TABLE +ENGINE MYISAM_OR_MARIA +VERSION 11 +ROW_FORMAT DYNAMIC_OR_PAGE +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_bin +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +MAX_INDEX_LENGTH #MIL# +TEMPORARY N +user_comment Users and global privileges +Separator ----------------------------------------------------- +TABLE_CATALOG def +TABLE_SCHEMA mysql TABLE_NAME gtid_slave_pos TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA @@ -738,10 +763,10 @@ Separator ----------------------------------------------------- TABLE_CATALOG def TABLE_SCHEMA mysql TABLE_NAME user -TABLE_TYPE BASE TABLE -ENGINE MYISAM_OR_MARIA -VERSION 10 -ROW_FORMAT DYNAMIC_OR_PAGE +TABLE_TYPE VIEW +ENGINE NULL +VERSION NULL +ROW_FORMAT NULL TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -752,13 +777,13 @@ AUTO_INCREMENT NULL CREATE_TIME #CRT# UPDATE_TIME #UT# CHECK_TIME #CT# -TABLE_COLLATION utf8_bin +TABLE_COLLATION NULL CHECKSUM NULL CREATE_OPTIONS #CO# TABLE_COMMENT #TC# MAX_INDEX_LENGTH #MIL# -TEMPORARY N -user_comment Users and global privileges +TEMPORARY NULL +user_comment VIEW Separator ----------------------------------------------------- DROP USER testuser1@localhost; CREATE USER testuser1@localhost; diff --git a/mysql-test/suite/funcs_1/r/is_tables_mysql_embedded.result b/mysql-test/suite/funcs_1/r/is_tables_mysql_embedded.result index c28b4b45ede..01381a5e746 100644 --- a/mysql-test/suite/funcs_1/r/is_tables_mysql_embedded.result +++ b/mysql-test/suite/funcs_1/r/is_tables_mysql_embedded.result @@ -162,6 +162,31 @@ user_comment General log Separator ----------------------------------------------------- TABLE_CATALOG def TABLE_SCHEMA mysql +TABLE_NAME global_priv +TABLE_TYPE BASE TABLE +ENGINE MYISAM_OR_MARIA +VERSION 11 +ROW_FORMAT DYNAMIC_OR_PAGE +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_bin +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +MAX_INDEX_LENGTH #MIL# +TEMPORARY N +user_comment Users and global privileges +Separator ----------------------------------------------------- +TABLE_CATALOG def +TABLE_SCHEMA mysql TABLE_NAME gtid_slave_pos TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA @@ -738,10 +763,10 @@ Separator ----------------------------------------------------- TABLE_CATALOG def TABLE_SCHEMA mysql TABLE_NAME user -TABLE_TYPE BASE TABLE -ENGINE MYISAM_OR_MARIA -VERSION 10 -ROW_FORMAT DYNAMIC_OR_PAGE +TABLE_TYPE VIEW +ENGINE NULL +VERSION NULL +ROW_FORMAT NULL TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -752,13 +777,13 @@ AUTO_INCREMENT NULL CREATE_TIME #CRT# UPDATE_TIME #UT# CHECK_TIME #CT# -TABLE_COLLATION utf8_bin +TABLE_COLLATION NULL CHECKSUM NULL CREATE_OPTIONS #CO# TABLE_COMMENT #TC# MAX_INDEX_LENGTH #MIL# -TEMPORARY N -user_comment Users and global privileges +TEMPORARY NULL +user_comment VIEW Separator ----------------------------------------------------- DROP USER testuser1@localhost; CREATE USER testuser1@localhost; @@ -926,6 +951,31 @@ user_comment General log Separator ----------------------------------------------------- TABLE_CATALOG def TABLE_SCHEMA mysql +TABLE_NAME global_priv +TABLE_TYPE BASE TABLE +ENGINE MYISAM_OR_MARIA +VERSION 11 +ROW_FORMAT DYNAMIC_OR_PAGE +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_bin +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +MAX_INDEX_LENGTH #MIL# +TEMPORARY N +user_comment Users and global privileges +Separator ----------------------------------------------------- +TABLE_CATALOG def +TABLE_SCHEMA mysql TABLE_NAME gtid_slave_pos TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA @@ -1502,10 +1552,10 @@ Separator ----------------------------------------------------- TABLE_CATALOG def TABLE_SCHEMA mysql TABLE_NAME user -TABLE_TYPE BASE TABLE -ENGINE MYISAM_OR_MARIA -VERSION 10 -ROW_FORMAT DYNAMIC_OR_PAGE +TABLE_TYPE VIEW +ENGINE NULL +VERSION NULL +ROW_FORMAT NULL TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -1516,13 +1566,13 @@ AUTO_INCREMENT NULL CREATE_TIME #CRT# UPDATE_TIME #UT# CHECK_TIME #CT# -TABLE_COLLATION utf8_bin +TABLE_COLLATION NULL CHECKSUM NULL CREATE_OPTIONS #CO# TABLE_COMMENT #TC# MAX_INDEX_LENGTH #MIL# -TEMPORARY N -user_comment Users and global privileges +TEMPORARY NULL +user_comment VIEW Separator ----------------------------------------------------- connection default; disconnect testuser1; diff --git a/mysql-test/suite/funcs_1/r/is_user_privileges.result b/mysql-test/suite/funcs_1/r/is_user_privileges.result index fa1284c355e..fe181fbf069 100644 --- a/mysql-test/suite/funcs_1/r/is_user_privileges.result +++ b/mysql-test/suite/funcs_1/r/is_user_privileges.result @@ -54,7 +54,6 @@ grantee table_catalog privilege_type # Testcases 3.2.16.2+3.2.16.3+3.2.16.4: INFORMATION_SCHEMA.USER_PRIVILEGES # accessible information ########################################################################## -DROP DATABASE IF EXISTS db_datadict; CREATE DATABASE db_datadict; DROP USER 'testuser1'@'localhost'; CREATE USER 'testuser1'@'localhost'; @@ -63,7 +62,7 @@ CREATE USER 'testuser2'@'localhost'; DROP USER 'testuser3'@'localhost'; CREATE USER 'testuser3'@'localhost'; GRANT SELECT ON db_datadict.* TO 'testuser1'@'localhost'; -GRANT SELECT ON mysql.user TO 'testuser1'@'localhost'; +GRANT SELECT ON mysql.global_priv TO 'testuser1'@'localhost'; GRANT INSERT ON *.* TO 'testuser2'@'localhost'; GRANT UPDATE ON *.* TO 'testuser2'@'localhost'; SELECT * FROM information_schema.user_privileges @@ -85,149 +84,29 @@ GRANTEE 'testuser3'@'localhost' TABLE_CATALOG def PRIVILEGE_TYPE USAGE IS_GRANTABLE NO -SELECT * FROM mysql.user +SELECT host,user,json_detailed(priv) FROM mysql.global_priv WHERE user LIKE 'testuser%' ORDER BY host, user; -Host localhost -User testuser1 -Password -Select_priv N -Insert_priv N -Update_priv N -Delete_priv N -Create_priv N -Drop_priv N -Reload_priv N -Shutdown_priv N -Process_priv N -File_priv N -Grant_priv N -References_priv N -Index_priv N -Alter_priv N -Show_db_priv N -Super_priv N -Create_tmp_table_priv N -Lock_tables_priv N -Execute_priv N -Repl_slave_priv N -Repl_client_priv N -Create_view_priv N -Show_view_priv N -Create_routine_priv N -Alter_routine_priv N -Create_user_priv N -Event_priv N -Trigger_priv N -Create_tablespace_priv N -Delete_history_priv N -ssl_type -ssl_cipher -x509_issuer -x509_subject -max_questions 0 -max_updates 0 -max_connections 0 -max_user_connections 0 -plugin mysql_native_password -authentication_string -password_expired N -is_role N -default_role -max_statement_time 0.000000 -Host localhost -User testuser2 -Password -Select_priv N -Insert_priv Y -Update_priv Y -Delete_priv N -Create_priv N -Drop_priv N -Reload_priv N -Shutdown_priv N -Process_priv N -File_priv N -Grant_priv N -References_priv N -Index_priv N -Alter_priv N -Show_db_priv N -Super_priv N -Create_tmp_table_priv N -Lock_tables_priv N -Execute_priv N -Repl_slave_priv N -Repl_client_priv N -Create_view_priv N -Show_view_priv N -Create_routine_priv N -Alter_routine_priv N -Create_user_priv N -Event_priv N -Trigger_priv N -Create_tablespace_priv N -Delete_history_priv N -ssl_type -ssl_cipher -x509_issuer -x509_subject -max_questions 0 -max_updates 0 -max_connections 0 -max_user_connections 0 -plugin mysql_native_password -authentication_string -password_expired N -is_role N -default_role -max_statement_time 0.000000 -Host localhost -User testuser3 -Password -Select_priv N -Insert_priv N -Update_priv N -Delete_priv N -Create_priv N -Drop_priv N -Reload_priv N -Shutdown_priv N -Process_priv N -File_priv N -Grant_priv N -References_priv N -Index_priv N -Alter_priv N -Show_db_priv N -Super_priv N -Create_tmp_table_priv N -Lock_tables_priv N -Execute_priv N -Repl_slave_priv N -Repl_client_priv N -Create_view_priv N -Show_view_priv N -Create_routine_priv N -Alter_routine_priv N -Create_user_priv N -Event_priv N -Trigger_priv N -Create_tablespace_priv N -Delete_history_priv N -ssl_type -ssl_cipher -x509_issuer -x509_subject -max_questions 0 -max_updates 0 -max_connections 0 -max_user_connections 0 -plugin mysql_native_password -authentication_string -password_expired N -is_role N -default_role -max_statement_time 0.000000 +host localhost +user testuser1 +json_detailed(priv) { + "access": 0, + "plugin": "mysql_native_password", + "authentication_string": "" +} +host localhost +user testuser2 +json_detailed(priv) { + "access": 6, + "plugin": "mysql_native_password", + "authentication_string": "" +} +host localhost +user testuser3 +json_detailed(priv) { + "access": 0, + "plugin": "mysql_native_password", + "authentication_string": "" +} # # Add GRANT OPTION db_datadict.* to testuser1; GRANT UPDATE ON db_datadict.* TO 'testuser1'@'localhost' WITH GRANT OPTION; @@ -250,149 +129,29 @@ GRANTEE 'testuser3'@'localhost' TABLE_CATALOG def PRIVILEGE_TYPE USAGE IS_GRANTABLE NO -SELECT * FROM mysql.user +SELECT host,user,json_detailed(priv) FROM mysql.global_priv WHERE user LIKE 'testuser%' ORDER BY host, user; -Host localhost -User testuser1 -Password -Select_priv N -Insert_priv N -Update_priv N -Delete_priv N -Create_priv N -Drop_priv N -Reload_priv N -Shutdown_priv N -Process_priv N -File_priv N -Grant_priv N -References_priv N -Index_priv N -Alter_priv N -Show_db_priv N -Super_priv N -Create_tmp_table_priv N -Lock_tables_priv N -Execute_priv N -Repl_slave_priv N -Repl_client_priv N -Create_view_priv N -Show_view_priv N -Create_routine_priv N -Alter_routine_priv N -Create_user_priv N -Event_priv N -Trigger_priv N -Create_tablespace_priv N -Delete_history_priv N -ssl_type -ssl_cipher -x509_issuer -x509_subject -max_questions 0 -max_updates 0 -max_connections 0 -max_user_connections 0 -plugin mysql_native_password -authentication_string -password_expired N -is_role N -default_role -max_statement_time 0.000000 -Host localhost -User testuser2 -Password -Select_priv N -Insert_priv Y -Update_priv Y -Delete_priv N -Create_priv N -Drop_priv N -Reload_priv N -Shutdown_priv N -Process_priv N -File_priv N -Grant_priv N -References_priv N -Index_priv N -Alter_priv N -Show_db_priv N -Super_priv N -Create_tmp_table_priv N -Lock_tables_priv N -Execute_priv N -Repl_slave_priv N -Repl_client_priv N -Create_view_priv N -Show_view_priv N -Create_routine_priv N -Alter_routine_priv N -Create_user_priv N -Event_priv N -Trigger_priv N -Create_tablespace_priv N -Delete_history_priv N -ssl_type -ssl_cipher -x509_issuer -x509_subject -max_questions 0 -max_updates 0 -max_connections 0 -max_user_connections 0 -plugin mysql_native_password -authentication_string -password_expired N -is_role N -default_role -max_statement_time 0.000000 -Host localhost -User testuser3 -Password -Select_priv N -Insert_priv N -Update_priv N -Delete_priv N -Create_priv N -Drop_priv N -Reload_priv N -Shutdown_priv N -Process_priv N -File_priv N -Grant_priv N -References_priv N -Index_priv N -Alter_priv N -Show_db_priv N -Super_priv N -Create_tmp_table_priv N -Lock_tables_priv N -Execute_priv N -Repl_slave_priv N -Repl_client_priv N -Create_view_priv N -Show_view_priv N -Create_routine_priv N -Alter_routine_priv N -Create_user_priv N -Event_priv N -Trigger_priv N -Create_tablespace_priv N -Delete_history_priv N -ssl_type -ssl_cipher -x509_issuer -x509_subject -max_questions 0 -max_updates 0 -max_connections 0 -max_user_connections 0 -plugin mysql_native_password -authentication_string -password_expired N -is_role N -default_role -max_statement_time 0.000000 +host localhost +user testuser1 +json_detailed(priv) { + "access": 0, + "plugin": "mysql_native_password", + "authentication_string": "" +} +host localhost +user testuser2 +json_detailed(priv) { + "access": 6, + "plugin": "mysql_native_password", + "authentication_string": "" +} +host localhost +user testuser3 +json_detailed(priv) { + "access": 0, + "plugin": "mysql_native_password", + "authentication_string": "" +} connect testuser1, localhost, testuser1, , db_datadict; SELECT * FROM information_schema.user_privileges WHERE grantee LIKE '''testuser%''' @@ -401,154 +160,34 @@ GRANTEE 'testuser1'@'localhost' TABLE_CATALOG def PRIVILEGE_TYPE USAGE IS_GRANTABLE NO -SELECT * FROM mysql.user +SELECT host,user,json_detailed(priv) FROM mysql.global_priv WHERE user LIKE 'testuser%' ORDER BY host, user; -Host localhost -User testuser1 -Password -Select_priv N -Insert_priv N -Update_priv N -Delete_priv N -Create_priv N -Drop_priv N -Reload_priv N -Shutdown_priv N -Process_priv N -File_priv N -Grant_priv N -References_priv N -Index_priv N -Alter_priv N -Show_db_priv N -Super_priv N -Create_tmp_table_priv N -Lock_tables_priv N -Execute_priv N -Repl_slave_priv N -Repl_client_priv N -Create_view_priv N -Show_view_priv N -Create_routine_priv N -Alter_routine_priv N -Create_user_priv N -Event_priv N -Trigger_priv N -Create_tablespace_priv N -Delete_history_priv N -ssl_type -ssl_cipher -x509_issuer -x509_subject -max_questions 0 -max_updates 0 -max_connections 0 -max_user_connections 0 -plugin mysql_native_password -authentication_string -password_expired N -is_role N -default_role -max_statement_time 0.000000 -Host localhost -User testuser2 -Password -Select_priv N -Insert_priv Y -Update_priv Y -Delete_priv N -Create_priv N -Drop_priv N -Reload_priv N -Shutdown_priv N -Process_priv N -File_priv N -Grant_priv N -References_priv N -Index_priv N -Alter_priv N -Show_db_priv N -Super_priv N -Create_tmp_table_priv N -Lock_tables_priv N -Execute_priv N -Repl_slave_priv N -Repl_client_priv N -Create_view_priv N -Show_view_priv N -Create_routine_priv N -Alter_routine_priv N -Create_user_priv N -Event_priv N -Trigger_priv N -Create_tablespace_priv N -Delete_history_priv N -ssl_type -ssl_cipher -x509_issuer -x509_subject -max_questions 0 -max_updates 0 -max_connections 0 -max_user_connections 0 -plugin mysql_native_password -authentication_string -password_expired N -is_role N -default_role -max_statement_time 0.000000 -Host localhost -User testuser3 -Password -Select_priv N -Insert_priv N -Update_priv N -Delete_priv N -Create_priv N -Drop_priv N -Reload_priv N -Shutdown_priv N -Process_priv N -File_priv N -Grant_priv N -References_priv N -Index_priv N -Alter_priv N -Show_db_priv N -Super_priv N -Create_tmp_table_priv N -Lock_tables_priv N -Execute_priv N -Repl_slave_priv N -Repl_client_priv N -Create_view_priv N -Show_view_priv N -Create_routine_priv N -Alter_routine_priv N -Create_user_priv N -Event_priv N -Trigger_priv N -Create_tablespace_priv N -Delete_history_priv N -ssl_type -ssl_cipher -x509_issuer -x509_subject -max_questions 0 -max_updates 0 -max_connections 0 -max_user_connections 0 -plugin mysql_native_password -authentication_string -password_expired N -is_role N -default_role -max_statement_time 0.000000 +host localhost +user testuser1 +json_detailed(priv) { + "access": 0, + "plugin": "mysql_native_password", + "authentication_string": "" +} +host localhost +user testuser2 +json_detailed(priv) { + "access": 6, + "plugin": "mysql_native_password", + "authentication_string": "" +} +host localhost +user testuser3 +json_detailed(priv) { + "access": 0, + "plugin": "mysql_native_password", + "authentication_string": "" +} SHOW GRANTS; Grants for testuser1@localhost GRANT USAGE ON *.* TO 'testuser1'@'localhost' GRANT SELECT, UPDATE ON `db_datadict`.* TO 'testuser1'@'localhost' WITH GRANT OPTION -GRANT SELECT ON `mysql`.`user` TO 'testuser1'@'localhost' +GRANT SELECT ON `mysql`.`global_priv` TO 'testuser1'@'localhost' # Now add SELECT on *.* to testuser1; connection default; @@ -574,149 +213,29 @@ GRANTEE 'testuser3'@'localhost' TABLE_CATALOG def PRIVILEGE_TYPE USAGE IS_GRANTABLE NO -SELECT * FROM mysql.user +SELECT host,user,json_detailed(priv) FROM mysql.global_priv WHERE user LIKE 'testuser%' ORDER BY host, user; -Host localhost -User testuser1 -Password -Select_priv Y -Insert_priv N -Update_priv N -Delete_priv N -Create_priv N -Drop_priv N -Reload_priv N -Shutdown_priv N -Process_priv N -File_priv N -Grant_priv N -References_priv N -Index_priv N -Alter_priv N -Show_db_priv N -Super_priv N -Create_tmp_table_priv N -Lock_tables_priv N -Execute_priv N -Repl_slave_priv N -Repl_client_priv N -Create_view_priv N -Show_view_priv N -Create_routine_priv N -Alter_routine_priv N -Create_user_priv N -Event_priv N -Trigger_priv N -Create_tablespace_priv N -Delete_history_priv N -ssl_type -ssl_cipher -x509_issuer -x509_subject -max_questions 0 -max_updates 0 -max_connections 0 -max_user_connections 0 -plugin mysql_native_password -authentication_string -password_expired N -is_role N -default_role -max_statement_time 0.000000 -Host localhost -User testuser2 -Password -Select_priv N -Insert_priv Y -Update_priv Y -Delete_priv N -Create_priv N -Drop_priv N -Reload_priv N -Shutdown_priv N -Process_priv N -File_priv N -Grant_priv N -References_priv N -Index_priv N -Alter_priv N -Show_db_priv N -Super_priv N -Create_tmp_table_priv N -Lock_tables_priv N -Execute_priv N -Repl_slave_priv N -Repl_client_priv N -Create_view_priv N -Show_view_priv N -Create_routine_priv N -Alter_routine_priv N -Create_user_priv N -Event_priv N -Trigger_priv N -Create_tablespace_priv N -Delete_history_priv N -ssl_type -ssl_cipher -x509_issuer -x509_subject -max_questions 0 -max_updates 0 -max_connections 0 -max_user_connections 0 -plugin mysql_native_password -authentication_string -password_expired N -is_role N -default_role -max_statement_time 0.000000 -Host localhost -User testuser3 -Password -Select_priv N -Insert_priv N -Update_priv N -Delete_priv N -Create_priv N -Drop_priv N -Reload_priv N -Shutdown_priv N -Process_priv N -File_priv N -Grant_priv N -References_priv N -Index_priv N -Alter_priv N -Show_db_priv N -Super_priv N -Create_tmp_table_priv N -Lock_tables_priv N -Execute_priv N -Repl_slave_priv N -Repl_client_priv N -Create_view_priv N -Show_view_priv N -Create_routine_priv N -Alter_routine_priv N -Create_user_priv N -Event_priv N -Trigger_priv N -Create_tablespace_priv N -Delete_history_priv N -ssl_type -ssl_cipher -x509_issuer -x509_subject -max_questions 0 -max_updates 0 -max_connections 0 -max_user_connections 0 -plugin mysql_native_password -authentication_string -password_expired N -is_role N -default_role -max_statement_time 0.000000 +host localhost +user testuser1 +json_detailed(priv) { + "access": 1, + "plugin": "mysql_native_password", + "authentication_string": "" +} +host localhost +user testuser2 +json_detailed(priv) { + "access": 6, + "plugin": "mysql_native_password", + "authentication_string": "" +} +host localhost +user testuser3 +json_detailed(priv) { + "access": 0, + "plugin": "mysql_native_password", + "authentication_string": "" +} GRANT SELECT ON *.* TO 'testuser1'@'localhost' WITH GRANT OPTION; # # Here <SELECT YES> is shown correctly for testuser1; @@ -739,149 +258,29 @@ GRANTEE 'testuser3'@'localhost' TABLE_CATALOG def PRIVILEGE_TYPE USAGE IS_GRANTABLE NO -SELECT * FROM mysql.user +SELECT host,user,json_detailed(priv) FROM mysql.global_priv WHERE user LIKE 'testuser%' ORDER BY host, user; -Host localhost -User testuser1 -Password -Select_priv Y -Insert_priv N -Update_priv N -Delete_priv N -Create_priv N -Drop_priv N -Reload_priv N -Shutdown_priv N -Process_priv N -File_priv N -Grant_priv Y -References_priv N -Index_priv N -Alter_priv N -Show_db_priv N -Super_priv N -Create_tmp_table_priv N -Lock_tables_priv N -Execute_priv N -Repl_slave_priv N -Repl_client_priv N -Create_view_priv N -Show_view_priv N -Create_routine_priv N -Alter_routine_priv N -Create_user_priv N -Event_priv N -Trigger_priv N -Create_tablespace_priv N -Delete_history_priv N -ssl_type -ssl_cipher -x509_issuer -x509_subject -max_questions 0 -max_updates 0 -max_connections 0 -max_user_connections 0 -plugin mysql_native_password -authentication_string -password_expired N -is_role N -default_role -max_statement_time 0.000000 -Host localhost -User testuser2 -Password -Select_priv N -Insert_priv Y -Update_priv Y -Delete_priv N -Create_priv N -Drop_priv N -Reload_priv N -Shutdown_priv N -Process_priv N -File_priv N -Grant_priv N -References_priv N -Index_priv N -Alter_priv N -Show_db_priv N -Super_priv N -Create_tmp_table_priv N -Lock_tables_priv N -Execute_priv N -Repl_slave_priv N -Repl_client_priv N -Create_view_priv N -Show_view_priv N -Create_routine_priv N -Alter_routine_priv N -Create_user_priv N -Event_priv N -Trigger_priv N -Create_tablespace_priv N -Delete_history_priv N -ssl_type -ssl_cipher -x509_issuer -x509_subject -max_questions 0 -max_updates 0 -max_connections 0 -max_user_connections 0 -plugin mysql_native_password -authentication_string -password_expired N -is_role N -default_role -max_statement_time 0.000000 -Host localhost -User testuser3 -Password -Select_priv N -Insert_priv N -Update_priv N -Delete_priv N -Create_priv N -Drop_priv N -Reload_priv N -Shutdown_priv N -Process_priv N -File_priv N -Grant_priv N -References_priv N -Index_priv N -Alter_priv N -Show_db_priv N -Super_priv N -Create_tmp_table_priv N -Lock_tables_priv N -Execute_priv N -Repl_slave_priv N -Repl_client_priv N -Create_view_priv N -Show_view_priv N -Create_routine_priv N -Alter_routine_priv N -Create_user_priv N -Event_priv N -Trigger_priv N -Create_tablespace_priv N -Delete_history_priv N -ssl_type -ssl_cipher -x509_issuer -x509_subject -max_questions 0 -max_updates 0 -max_connections 0 -max_user_connections 0 -plugin mysql_native_password -authentication_string -password_expired N -is_role N -default_role -max_statement_time 0.000000 +host localhost +user testuser1 +json_detailed(priv) { + "access": 1025, + "plugin": "mysql_native_password", + "authentication_string": "" +} +host localhost +user testuser2 +json_detailed(priv) { + "access": 6, + "plugin": "mysql_native_password", + "authentication_string": "" +} +host localhost +user testuser3 +json_detailed(priv) { + "access": 0, + "plugin": "mysql_native_password", + "authentication_string": "" +} connection testuser1; SELECT * FROM information_schema.user_privileges WHERE grantee LIKE '''testuser%''' @@ -890,154 +289,34 @@ GRANTEE 'testuser1'@'localhost' TABLE_CATALOG def PRIVILEGE_TYPE SELECT IS_GRANTABLE YES -SELECT * FROM mysql.user +SELECT host,user,json_detailed(priv) FROM mysql.global_priv WHERE user LIKE 'testuser%' ORDER BY host, user; -Host localhost -User testuser1 -Password -Select_priv Y -Insert_priv N -Update_priv N -Delete_priv N -Create_priv N -Drop_priv N -Reload_priv N -Shutdown_priv N -Process_priv N -File_priv N -Grant_priv Y -References_priv N -Index_priv N -Alter_priv N -Show_db_priv N -Super_priv N -Create_tmp_table_priv N -Lock_tables_priv N -Execute_priv N -Repl_slave_priv N -Repl_client_priv N -Create_view_priv N -Show_view_priv N -Create_routine_priv N -Alter_routine_priv N -Create_user_priv N -Event_priv N -Trigger_priv N -Create_tablespace_priv N -Delete_history_priv N -ssl_type -ssl_cipher -x509_issuer -x509_subject -max_questions 0 -max_updates 0 -max_connections 0 -max_user_connections 0 -plugin mysql_native_password -authentication_string -password_expired N -is_role N -default_role -max_statement_time 0.000000 -Host localhost -User testuser2 -Password -Select_priv N -Insert_priv Y -Update_priv Y -Delete_priv N -Create_priv N -Drop_priv N -Reload_priv N -Shutdown_priv N -Process_priv N -File_priv N -Grant_priv N -References_priv N -Index_priv N -Alter_priv N -Show_db_priv N -Super_priv N -Create_tmp_table_priv N -Lock_tables_priv N -Execute_priv N -Repl_slave_priv N -Repl_client_priv N -Create_view_priv N -Show_view_priv N -Create_routine_priv N -Alter_routine_priv N -Create_user_priv N -Event_priv N -Trigger_priv N -Create_tablespace_priv N -Delete_history_priv N -ssl_type -ssl_cipher -x509_issuer -x509_subject -max_questions 0 -max_updates 0 -max_connections 0 -max_user_connections 0 -plugin mysql_native_password -authentication_string -password_expired N -is_role N -default_role -max_statement_time 0.000000 -Host localhost -User testuser3 -Password -Select_priv N -Insert_priv N -Update_priv N -Delete_priv N -Create_priv N -Drop_priv N -Reload_priv N -Shutdown_priv N -Process_priv N -File_priv N -Grant_priv N -References_priv N -Index_priv N -Alter_priv N -Show_db_priv N -Super_priv N -Create_tmp_table_priv N -Lock_tables_priv N -Execute_priv N -Repl_slave_priv N -Repl_client_priv N -Create_view_priv N -Show_view_priv N -Create_routine_priv N -Alter_routine_priv N -Create_user_priv N -Event_priv N -Trigger_priv N -Create_tablespace_priv N -Delete_history_priv N -ssl_type -ssl_cipher -x509_issuer -x509_subject -max_questions 0 -max_updates 0 -max_connections 0 -max_user_connections 0 -plugin mysql_native_password -authentication_string -password_expired N -is_role N -default_role -max_statement_time 0.000000 +host localhost +user testuser1 +json_detailed(priv) { + "access": 1025, + "plugin": "mysql_native_password", + "authentication_string": "" +} +host localhost +user testuser2 +json_detailed(priv) { + "access": 6, + "plugin": "mysql_native_password", + "authentication_string": "" +} +host localhost +user testuser3 +json_detailed(priv) { + "access": 0, + "plugin": "mysql_native_password", + "authentication_string": "" +} SHOW GRANTS; Grants for testuser1@localhost GRANT SELECT ON *.* TO 'testuser1'@'localhost' WITH GRANT OPTION GRANT SELECT, UPDATE ON `db_datadict`.* TO 'testuser1'@'localhost' WITH GRANT OPTION -GRANT SELECT ON `mysql`.`user` TO 'testuser1'@'localhost' +GRANT SELECT ON `mysql`.`global_priv` TO 'testuser1'@'localhost' connect testuser2, localhost, testuser2, , db_datadict; SELECT * FROM information_schema.user_privileges WHERE grantee LIKE '''testuser%''' @@ -1050,9 +329,9 @@ GRANTEE 'testuser2'@'localhost' TABLE_CATALOG def PRIVILEGE_TYPE UPDATE IS_GRANTABLE NO -SELECT * FROM mysql.user +SELECT host,user,json_detailed(priv) FROM mysql.global_priv WHERE user LIKE 'testuser%' ORDER BY host, user; -ERROR 42000: SELECT command denied to user 'testuser2'@'localhost' for table 'user' +ERROR 42000: SELECT command denied to user 'testuser2'@'localhost' for table 'global_priv' SHOW GRANTS; Grants for testuser2@localhost GRANT INSERT, UPDATE ON *.* TO 'testuser2'@'localhost' @@ -1064,9 +343,9 @@ GRANTEE 'testuser3'@'localhost' TABLE_CATALOG def PRIVILEGE_TYPE USAGE IS_GRANTABLE NO -SELECT * FROM mysql.user +SELECT host,user,json_detailed(priv) FROM mysql.global_priv WHERE user LIKE 'testuser%' ORDER BY host, user; -ERROR 42000: SELECT command denied to user 'testuser3'@'localhost' for table 'user' +ERROR 42000: SELECT command denied to user 'testuser3'@'localhost' for table 'global_priv' SHOW GRANTS; Grants for testuser3@localhost GRANT USAGE ON *.* TO 'testuser3'@'localhost' @@ -1093,149 +372,29 @@ GRANTEE 'testuser3'@'localhost' TABLE_CATALOG def PRIVILEGE_TYPE USAGE IS_GRANTABLE NO -SELECT * FROM mysql.user +SELECT host,user,json_detailed(priv) FROM mysql.global_priv WHERE user LIKE 'testuser%' ORDER BY host, user; -Host localhost -User testuser1 -Password -Select_priv N -Insert_priv N -Update_priv N -Delete_priv N -Create_priv N -Drop_priv N -Reload_priv N -Shutdown_priv N -Process_priv N -File_priv N -Grant_priv N -References_priv N -Index_priv N -Alter_priv N -Show_db_priv N -Super_priv N -Create_tmp_table_priv N -Lock_tables_priv N -Execute_priv N -Repl_slave_priv N -Repl_client_priv N -Create_view_priv N -Show_view_priv N -Create_routine_priv N -Alter_routine_priv N -Create_user_priv N -Event_priv N -Trigger_priv N -Create_tablespace_priv N -Delete_history_priv N -ssl_type -ssl_cipher -x509_issuer -x509_subject -max_questions 0 -max_updates 0 -max_connections 0 -max_user_connections 0 -plugin mysql_native_password -authentication_string -password_expired N -is_role N -default_role -max_statement_time 0.000000 -Host localhost -User testuser2 -Password -Select_priv N -Insert_priv Y -Update_priv Y -Delete_priv N -Create_priv N -Drop_priv N -Reload_priv N -Shutdown_priv N -Process_priv N -File_priv N -Grant_priv N -References_priv N -Index_priv N -Alter_priv N -Show_db_priv N -Super_priv N -Create_tmp_table_priv N -Lock_tables_priv N -Execute_priv N -Repl_slave_priv N -Repl_client_priv N -Create_view_priv N -Show_view_priv N -Create_routine_priv N -Alter_routine_priv N -Create_user_priv N -Event_priv N -Trigger_priv N -Create_tablespace_priv N -Delete_history_priv N -ssl_type -ssl_cipher -x509_issuer -x509_subject -max_questions 0 -max_updates 0 -max_connections 0 -max_user_connections 0 -plugin mysql_native_password -authentication_string -password_expired N -is_role N -default_role -max_statement_time 0.000000 -Host localhost -User testuser3 -Password -Select_priv N -Insert_priv N -Update_priv N -Delete_priv N -Create_priv N -Drop_priv N -Reload_priv N -Shutdown_priv N -Process_priv N -File_priv N -Grant_priv N -References_priv N -Index_priv N -Alter_priv N -Show_db_priv N -Super_priv N -Create_tmp_table_priv N -Lock_tables_priv N -Execute_priv N -Repl_slave_priv N -Repl_client_priv N -Create_view_priv N -Show_view_priv N -Create_routine_priv N -Alter_routine_priv N -Create_user_priv N -Event_priv N -Trigger_priv N -Create_tablespace_priv N -Delete_history_priv N -ssl_type -ssl_cipher -x509_issuer -x509_subject -max_questions 0 -max_updates 0 -max_connections 0 -max_user_connections 0 -plugin mysql_native_password -authentication_string -password_expired N -is_role N -default_role -max_statement_time 0.000000 +host localhost +user testuser1 +json_detailed(priv) { + "access": 0, + "plugin": "mysql_native_password", + "authentication_string": "" +} +host localhost +user testuser2 +json_detailed(priv) { + "access": 6, + "plugin": "mysql_native_password", + "authentication_string": "" +} +host localhost +user testuser3 +json_detailed(priv) { + "access": 0, + "plugin": "mysql_native_password", + "authentication_string": "" +} connection testuser1; SELECT * FROM information_schema.user_privileges WHERE grantee LIKE '''testuser%''' @@ -1244,9 +403,9 @@ GRANTEE 'testuser1'@'localhost' TABLE_CATALOG def PRIVILEGE_TYPE USAGE IS_GRANTABLE NO -SELECT * FROM mysql.user +SELECT host,user,json_detailed(priv) FROM mysql.global_priv WHERE user LIKE 'testuser%' ORDER BY host, user; -ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table 'user' +ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table 'global_priv' SHOW GRANTS; Grants for testuser1@localhost GRANT USAGE ON *.* TO 'testuser1'@'localhost' @@ -1259,19 +418,19 @@ GRANTEE 'testuser1'@'localhost' TABLE_CATALOG def PRIVILEGE_TYPE USAGE IS_GRANTABLE NO -SELECT * FROM mysql.user +SELECT host,user,json_detailed(priv) FROM mysql.global_priv WHERE user LIKE 'testuser%' ORDER BY host, user; -ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table 'user' +ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table 'global_priv' SHOW GRANTS; Grants for testuser1@localhost GRANT USAGE ON *.* TO 'testuser1'@'localhost' CREATE TABLE db_datadict.tb_66 ( c1 TEXT ); ERROR 42000: CREATE command denied to user 'testuser1'@'localhost' for table 'tb_66' -# Add ALL on db_datadict.* (and select on mysql.user) to testuser1; +# Add ALL on db_datadict.* (and select on mysql.global_priv) to testuser1; connection default; GRANT ALL ON db_datadict.* TO 'testuser1'@'localhost' WITH GRANT OPTION; -GRANT SELECT ON mysql.user TO 'testuser1'@'localhost'; +GRANT SELECT ON mysql.global_priv TO 'testuser1'@'localhost'; SELECT * FROM information_schema.user_privileges WHERE grantee LIKE '''testuser%''' ORDER BY grantee, table_catalog, privilege_type; @@ -1291,149 +450,29 @@ GRANTEE 'testuser3'@'localhost' TABLE_CATALOG def PRIVILEGE_TYPE USAGE IS_GRANTABLE NO -SELECT * FROM mysql.user +SELECT host,user,json_detailed(priv) FROM mysql.global_priv WHERE user LIKE 'testuser%' ORDER BY host, user; -Host localhost -User testuser1 -Password -Select_priv N -Insert_priv N -Update_priv N -Delete_priv N -Create_priv N -Drop_priv N -Reload_priv N -Shutdown_priv N -Process_priv N -File_priv N -Grant_priv N -References_priv N -Index_priv N -Alter_priv N -Show_db_priv N -Super_priv N -Create_tmp_table_priv N -Lock_tables_priv N -Execute_priv N -Repl_slave_priv N -Repl_client_priv N -Create_view_priv N -Show_view_priv N -Create_routine_priv N -Alter_routine_priv N -Create_user_priv N -Event_priv N -Trigger_priv N -Create_tablespace_priv N -Delete_history_priv N -ssl_type -ssl_cipher -x509_issuer -x509_subject -max_questions 0 -max_updates 0 -max_connections 0 -max_user_connections 0 -plugin mysql_native_password -authentication_string -password_expired N -is_role N -default_role -max_statement_time 0.000000 -Host localhost -User testuser2 -Password -Select_priv N -Insert_priv Y -Update_priv Y -Delete_priv N -Create_priv N -Drop_priv N -Reload_priv N -Shutdown_priv N -Process_priv N -File_priv N -Grant_priv N -References_priv N -Index_priv N -Alter_priv N -Show_db_priv N -Super_priv N -Create_tmp_table_priv N -Lock_tables_priv N -Execute_priv N -Repl_slave_priv N -Repl_client_priv N -Create_view_priv N -Show_view_priv N -Create_routine_priv N -Alter_routine_priv N -Create_user_priv N -Event_priv N -Trigger_priv N -Create_tablespace_priv N -Delete_history_priv N -ssl_type -ssl_cipher -x509_issuer -x509_subject -max_questions 0 -max_updates 0 -max_connections 0 -max_user_connections 0 -plugin mysql_native_password -authentication_string -password_expired N -is_role N -default_role -max_statement_time 0.000000 -Host localhost -User testuser3 -Password -Select_priv N -Insert_priv N -Update_priv N -Delete_priv N -Create_priv N -Drop_priv N -Reload_priv N -Shutdown_priv N -Process_priv N -File_priv N -Grant_priv N -References_priv N -Index_priv N -Alter_priv N -Show_db_priv N -Super_priv N -Create_tmp_table_priv N -Lock_tables_priv N -Execute_priv N -Repl_slave_priv N -Repl_client_priv N -Create_view_priv N -Show_view_priv N -Create_routine_priv N -Alter_routine_priv N -Create_user_priv N -Event_priv N -Trigger_priv N -Create_tablespace_priv N -Delete_history_priv N -ssl_type -ssl_cipher -x509_issuer -x509_subject -max_questions 0 -max_updates 0 -max_connections 0 -max_user_connections 0 -plugin mysql_native_password -authentication_string -password_expired N -is_role N -default_role -max_statement_time 0.000000 +host localhost +user testuser1 +json_detailed(priv) { + "access": 0, + "plugin": "mysql_native_password", + "authentication_string": "" +} +host localhost +user testuser2 +json_detailed(priv) { + "access": 6, + "plugin": "mysql_native_password", + "authentication_string": "" +} +host localhost +user testuser3 +json_detailed(priv) { + "access": 0, + "plugin": "mysql_native_password", + "authentication_string": "" +} connection testuser1; SELECT * FROM information_schema.user_privileges WHERE grantee LIKE '''testuser%''' @@ -1442,154 +481,34 @@ GRANTEE 'testuser1'@'localhost' TABLE_CATALOG def PRIVILEGE_TYPE USAGE IS_GRANTABLE NO -SELECT * FROM mysql.user +SELECT host,user,json_detailed(priv) FROM mysql.global_priv WHERE user LIKE 'testuser%' ORDER BY host, user; -Host localhost -User testuser1 -Password -Select_priv N -Insert_priv N -Update_priv N -Delete_priv N -Create_priv N -Drop_priv N -Reload_priv N -Shutdown_priv N -Process_priv N -File_priv N -Grant_priv N -References_priv N -Index_priv N -Alter_priv N -Show_db_priv N -Super_priv N -Create_tmp_table_priv N -Lock_tables_priv N -Execute_priv N -Repl_slave_priv N -Repl_client_priv N -Create_view_priv N -Show_view_priv N -Create_routine_priv N -Alter_routine_priv N -Create_user_priv N -Event_priv N -Trigger_priv N -Create_tablespace_priv N -Delete_history_priv N -ssl_type -ssl_cipher -x509_issuer -x509_subject -max_questions 0 -max_updates 0 -max_connections 0 -max_user_connections 0 -plugin mysql_native_password -authentication_string -password_expired N -is_role N -default_role -max_statement_time 0.000000 -Host localhost -User testuser2 -Password -Select_priv N -Insert_priv Y -Update_priv Y -Delete_priv N -Create_priv N -Drop_priv N -Reload_priv N -Shutdown_priv N -Process_priv N -File_priv N -Grant_priv N -References_priv N -Index_priv N -Alter_priv N -Show_db_priv N -Super_priv N -Create_tmp_table_priv N -Lock_tables_priv N -Execute_priv N -Repl_slave_priv N -Repl_client_priv N -Create_view_priv N -Show_view_priv N -Create_routine_priv N -Alter_routine_priv N -Create_user_priv N -Event_priv N -Trigger_priv N -Create_tablespace_priv N -Delete_history_priv N -ssl_type -ssl_cipher -x509_issuer -x509_subject -max_questions 0 -max_updates 0 -max_connections 0 -max_user_connections 0 -plugin mysql_native_password -authentication_string -password_expired N -is_role N -default_role -max_statement_time 0.000000 -Host localhost -User testuser3 -Password -Select_priv N -Insert_priv N -Update_priv N -Delete_priv N -Create_priv N -Drop_priv N -Reload_priv N -Shutdown_priv N -Process_priv N -File_priv N -Grant_priv N -References_priv N -Index_priv N -Alter_priv N -Show_db_priv N -Super_priv N -Create_tmp_table_priv N -Lock_tables_priv N -Execute_priv N -Repl_slave_priv N -Repl_client_priv N -Create_view_priv N -Show_view_priv N -Create_routine_priv N -Alter_routine_priv N -Create_user_priv N -Event_priv N -Trigger_priv N -Create_tablespace_priv N -Delete_history_priv N -ssl_type -ssl_cipher -x509_issuer -x509_subject -max_questions 0 -max_updates 0 -max_connections 0 -max_user_connections 0 -plugin mysql_native_password -authentication_string -password_expired N -is_role N -default_role -max_statement_time 0.000000 +host localhost +user testuser1 +json_detailed(priv) { + "access": 0, + "plugin": "mysql_native_password", + "authentication_string": "" +} +host localhost +user testuser2 +json_detailed(priv) { + "access": 6, + "plugin": "mysql_native_password", + "authentication_string": "" +} +host localhost +user testuser3 +json_detailed(priv) { + "access": 0, + "plugin": "mysql_native_password", + "authentication_string": "" +} SHOW GRANTS; Grants for testuser1@localhost GRANT USAGE ON *.* TO 'testuser1'@'localhost' GRANT ALL PRIVILEGES ON `db_datadict`.* TO 'testuser1'@'localhost' WITH GRANT OPTION -GRANT SELECT ON `mysql`.`user` TO 'testuser1'@'localhost' +GRANT SELECT ON `mysql`.`global_priv` TO 'testuser1'@'localhost' CREATE TABLE db_datadict.tb_56 ( c1 TEXT ); ERROR 42000: CREATE command denied to user 'testuser1'@'localhost' for table 'tb_56' USE db_datadict; @@ -1600,154 +519,34 @@ GRANTEE 'testuser1'@'localhost' TABLE_CATALOG def PRIVILEGE_TYPE USAGE IS_GRANTABLE NO -SELECT * FROM mysql.user +SELECT host,user,json_detailed(priv) FROM mysql.global_priv WHERE user LIKE 'testuser%' ORDER BY host, user; -Host localhost -User testuser1 -Password -Select_priv N -Insert_priv N -Update_priv N -Delete_priv N -Create_priv N -Drop_priv N -Reload_priv N -Shutdown_priv N -Process_priv N -File_priv N -Grant_priv N -References_priv N -Index_priv N -Alter_priv N -Show_db_priv N -Super_priv N -Create_tmp_table_priv N -Lock_tables_priv N -Execute_priv N -Repl_slave_priv N -Repl_client_priv N -Create_view_priv N -Show_view_priv N -Create_routine_priv N -Alter_routine_priv N -Create_user_priv N -Event_priv N -Trigger_priv N -Create_tablespace_priv N -Delete_history_priv N -ssl_type -ssl_cipher -x509_issuer -x509_subject -max_questions 0 -max_updates 0 -max_connections 0 -max_user_connections 0 -plugin mysql_native_password -authentication_string -password_expired N -is_role N -default_role -max_statement_time 0.000000 -Host localhost -User testuser2 -Password -Select_priv N -Insert_priv Y -Update_priv Y -Delete_priv N -Create_priv N -Drop_priv N -Reload_priv N -Shutdown_priv N -Process_priv N -File_priv N -Grant_priv N -References_priv N -Index_priv N -Alter_priv N -Show_db_priv N -Super_priv N -Create_tmp_table_priv N -Lock_tables_priv N -Execute_priv N -Repl_slave_priv N -Repl_client_priv N -Create_view_priv N -Show_view_priv N -Create_routine_priv N -Alter_routine_priv N -Create_user_priv N -Event_priv N -Trigger_priv N -Create_tablespace_priv N -Delete_history_priv N -ssl_type -ssl_cipher -x509_issuer -x509_subject -max_questions 0 -max_updates 0 -max_connections 0 -max_user_connections 0 -plugin mysql_native_password -authentication_string -password_expired N -is_role N -default_role -max_statement_time 0.000000 -Host localhost -User testuser3 -Password -Select_priv N -Insert_priv N -Update_priv N -Delete_priv N -Create_priv N -Drop_priv N -Reload_priv N -Shutdown_priv N -Process_priv N -File_priv N -Grant_priv N -References_priv N -Index_priv N -Alter_priv N -Show_db_priv N -Super_priv N -Create_tmp_table_priv N -Lock_tables_priv N -Execute_priv N -Repl_slave_priv N -Repl_client_priv N -Create_view_priv N -Show_view_priv N -Create_routine_priv N -Alter_routine_priv N -Create_user_priv N -Event_priv N -Trigger_priv N -Create_tablespace_priv N -Delete_history_priv N -ssl_type -ssl_cipher -x509_issuer -x509_subject -max_questions 0 -max_updates 0 -max_connections 0 -max_user_connections 0 -plugin mysql_native_password -authentication_string -password_expired N -is_role N -default_role -max_statement_time 0.000000 +host localhost +user testuser1 +json_detailed(priv) { + "access": 0, + "plugin": "mysql_native_password", + "authentication_string": "" +} +host localhost +user testuser2 +json_detailed(priv) { + "access": 6, + "plugin": "mysql_native_password", + "authentication_string": "" +} +host localhost +user testuser3 +json_detailed(priv) { + "access": 0, + "plugin": "mysql_native_password", + "authentication_string": "" +} SHOW GRANTS; Grants for testuser1@localhost GRANT USAGE ON *.* TO 'testuser1'@'localhost' GRANT ALL PRIVILEGES ON `db_datadict`.* TO 'testuser1'@'localhost' WITH GRANT OPTION -GRANT SELECT ON `mysql`.`user` TO 'testuser1'@'localhost' +GRANT SELECT ON `mysql`.`global_priv` TO 'testuser1'@'localhost' CREATE TABLE tb_57 ( c1 TEXT ) ENGINE = <other_engine_type>; @@ -1773,149 +572,29 @@ GRANTEE 'testuser3'@'localhost' TABLE_CATALOG def PRIVILEGE_TYPE USAGE IS_GRANTABLE NO -SELECT * FROM mysql.user +SELECT host,user,json_detailed(priv) FROM mysql.global_priv WHERE user LIKE 'testuser%' ORDER BY host, user; -Host localhost -User testuser1 -Password -Select_priv N -Insert_priv N -Update_priv N -Delete_priv N -Create_priv N -Drop_priv N -Reload_priv N -Shutdown_priv N -Process_priv N -File_priv N -Grant_priv N -References_priv N -Index_priv N -Alter_priv N -Show_db_priv N -Super_priv N -Create_tmp_table_priv N -Lock_tables_priv N -Execute_priv N -Repl_slave_priv N -Repl_client_priv N -Create_view_priv N -Show_view_priv N -Create_routine_priv N -Alter_routine_priv N -Create_user_priv N -Event_priv N -Trigger_priv N -Create_tablespace_priv N -Delete_history_priv N -ssl_type -ssl_cipher -x509_issuer -x509_subject -max_questions 0 -max_updates 0 -max_connections 0 -max_user_connections 0 -plugin mysql_native_password -authentication_string -password_expired N -is_role N -default_role -max_statement_time 0.000000 -Host localhost -User testuser2 -Password -Select_priv N -Insert_priv Y -Update_priv Y -Delete_priv N -Create_priv N -Drop_priv N -Reload_priv N -Shutdown_priv N -Process_priv N -File_priv N -Grant_priv N -References_priv N -Index_priv N -Alter_priv N -Show_db_priv N -Super_priv N -Create_tmp_table_priv N -Lock_tables_priv N -Execute_priv N -Repl_slave_priv N -Repl_client_priv N -Create_view_priv N -Show_view_priv N -Create_routine_priv N -Alter_routine_priv N -Create_user_priv N -Event_priv N -Trigger_priv N -Create_tablespace_priv N -Delete_history_priv N -ssl_type -ssl_cipher -x509_issuer -x509_subject -max_questions 0 -max_updates 0 -max_connections 0 -max_user_connections 0 -plugin mysql_native_password -authentication_string -password_expired N -is_role N -default_role -max_statement_time 0.000000 -Host localhost -User testuser3 -Password -Select_priv N -Insert_priv N -Update_priv N -Delete_priv N -Create_priv N -Drop_priv N -Reload_priv N -Shutdown_priv N -Process_priv N -File_priv N -Grant_priv N -References_priv N -Index_priv N -Alter_priv N -Show_db_priv N -Super_priv N -Create_tmp_table_priv N -Lock_tables_priv N -Execute_priv N -Repl_slave_priv N -Repl_client_priv N -Create_view_priv N -Show_view_priv N -Create_routine_priv N -Alter_routine_priv N -Create_user_priv N -Event_priv N -Trigger_priv N -Create_tablespace_priv N -Delete_history_priv N -ssl_type -ssl_cipher -x509_issuer -x509_subject -max_questions 0 -max_updates 0 -max_connections 0 -max_user_connections 0 -plugin mysql_native_password -authentication_string -password_expired N -is_role N -default_role -max_statement_time 0.000000 +host localhost +user testuser1 +json_detailed(priv) { + "access": 0, + "plugin": "mysql_native_password", + "authentication_string": "" +} +host localhost +user testuser2 +json_detailed(priv) { + "access": 6, + "plugin": "mysql_native_password", + "authentication_string": "" +} +host localhost +user testuser3 +json_detailed(priv) { + "access": 0, + "plugin": "mysql_native_password", + "authentication_string": "" +} connection testuser1; SELECT * FROM information_schema.user_privileges WHERE grantee LIKE '''testuser%''' @@ -1924,9 +603,9 @@ GRANTEE 'testuser1'@'localhost' TABLE_CATALOG def PRIVILEGE_TYPE USAGE IS_GRANTABLE NO -SELECT * FROM mysql.user +SELECT host,user,json_detailed(priv) FROM mysql.global_priv WHERE user LIKE 'testuser%' ORDER BY host, user; -ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table 'user' +ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table 'global_priv' SHOW GRANTS; Grants for testuser1@localhost GRANT USAGE ON *.* TO 'testuser1'@'localhost' diff --git a/mysql-test/suite/funcs_1/r/is_views.result b/mysql-test/suite/funcs_1/r/is_views.result index 62ec33c8340..e6a2715bbb3 100644 --- a/mysql-test/suite/funcs_1/r/is_views.result +++ b/mysql-test/suite/funcs_1/r/is_views.result @@ -70,6 +70,7 @@ ALGORITHM varchar(10) NO SELECT table_catalog, table_schema, table_name FROM information_schema.views WHERE table_catalog IS NOT NULL; table_catalog table_schema table_name +def mysql user ################################################################################ # Testcase 3.2.13.2 + 3.2.13.3: INFORMATION_SCHEMA.VIEWS accessible information ################################################################################ diff --git a/mysql-test/suite/funcs_1/r/is_views_embedded.result b/mysql-test/suite/funcs_1/r/is_views_embedded.result index c382370e892..cc6ade7daaf 100644 --- a/mysql-test/suite/funcs_1/r/is_views_embedded.result +++ b/mysql-test/suite/funcs_1/r/is_views_embedded.result @@ -70,6 +70,7 @@ ALGORITHM varchar(10) NO SELECT table_catalog, table_schema, table_name FROM information_schema.views WHERE table_catalog IS NOT NULL; table_catalog table_schema table_name +def mysql user ################################################################################ # Testcase 3.2.13.2 + 3.2.13.3: INFORMATION_SCHEMA.VIEWS accessible information ################################################################################ |