This commit is contained in:
Alexey Botchkov 2011-11-12 19:56:29 +04:00
commit 7c7269d372
568 changed files with 47077 additions and 11234 deletions

View file

@ -427,7 +427,7 @@ ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
#
#####################################################################################
# mysqlbinlog --skip-annotate-rows-events
# mysqlbinlog --skip-annotate-row-events
# No Annotates should appear in this output
#####################################################################################
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
@ -1013,7 +1013,7 @@ ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
#
#####################################################################################
# mysqlbinlog --read-from-remote-server --skip-annotate-rows-events
# mysqlbinlog --read-from-remote-server --skip-annotate-row-events
# No Annotates should appear in this output
#####################################################################################
/*!40019 SET @@session.max_insert_delayed_threads=0*/;

View file

@ -1,11 +1,11 @@
###############################################################################
# WL47: Store in binlog text of statements that caused RBR events
# new event: ANNOTATE_ROWS_EVENT
# new master option: --binlog-annotate-rows-events
# new mysqlbinlog option: --skip-annotate-rows-events
# new master option: --binlog-annotate-row-events
# new mysqlbinlog option: --skip-annotate-row-events
#
# Intended to test that:
# *** If the --binlog-annotate-rows-events option is switched on on master
# *** If the --binlog-annotate-row-events option is switched on on master
# then Annotate_rows events:
# - are generated;
# - are genrated only once for "multi-table-maps" rbr queries;
@ -13,9 +13,9 @@
# - are generated when the corresponding queries are filtered away partialy
# (e.g. in case of multi-delete).
# *** Annotate_rows events are printed by mysqlbinlog started without
# --skip-annotate-rows-events options both in remote and local cases.
# --skip-annotate-row-events options both in remote and local cases.
# *** Annotate_rows events are not printed by mysqlbinlog started with
# --skip-annotate-rows-events options both in remote and local cases.
# --skip-annotate-row-events options both in remote and local cases.
###############################################################################
--source include/have_log_bin.inc
@ -54,11 +54,11 @@ CREATE TABLE xtest1.xt1(a int);
CREATE DATABASE xtest2;
CREATE TABLE xtest2.xt2(a int);
# By default SESSION binlog_annotate_rows_events = OFF
# By default SESSION binlog_annotate_row_events = OFF
INSERT INTO test1.t1 VALUES (1), (2), (3);
SET SESSION binlog_annotate_rows_events = ON;
SET SESSION binlog_annotate_row_events = ON;
INSERT INTO test2.t2 VALUES (1), (2), (3);
INSERT INTO test3.t3 VALUES (1), (2), (3);
@ -133,13 +133,13 @@ let $MYSQLD_DATADIR= `select @@datadir`;
--echo #
--echo #####################################################################################
--echo # mysqlbinlog --skip-annotate-rows-events
--echo # mysqlbinlog --skip-annotate-row-events
--echo # No Annotates should appear in this output
--echo #####################################################################################
let $MYSQLD_DATADIR= `select @@datadir`;
--replace_regex /server id [0-9]*/server id #/ /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/
--exec $MYSQL_BINLOG --base64-output=decode-rows --skip-annotate-rows-events -v -v $MYSQLD_DATADIR/master-bin.000001
--exec $MYSQL_BINLOG --base64-output=decode-rows --skip-annotate-row-events -v -v $MYSQLD_DATADIR/master-bin.000001
--echo #
--echo #####################################################################################
@ -169,13 +169,13 @@ let $MYSQLD_DATADIR= `select @@datadir`;
--echo #
--echo #####################################################################################
--echo # mysqlbinlog --read-from-remote-server --skip-annotate-rows-events
--echo # mysqlbinlog --read-from-remote-server --skip-annotate-row-events
--echo # No Annotates should appear in this output
--echo #####################################################################################
let $MYSQLD_DATADIR= `select @@datadir`;
--replace_regex /server id [0-9]*/server id #/ /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/
--exec $MYSQL_BINLOG --base64-output=decode-rows --skip-annotate-rows-events -v -v --read-from-remote-server --user=root --host=localhost --port=$MASTER_MYPORT master-bin.000001
--exec $MYSQL_BINLOG --base64-output=decode-rows --skip-annotate-row-events -v -v --read-from-remote-server --user=root --host=localhost --port=$MASTER_MYPORT master-bin.000001
# Clean-up

View file

@ -17,7 +17,7 @@
# let $table= processlist;
#
# columns of the information_schema table e.g. to use in a select.
# let $columns= ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO;
# let $columns= ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, PROGRESS;
#
# Where clause for an update.
# let $update_where= WHERE id=1 ;

View file

@ -66,7 +66,7 @@
let $table= processlist;
#
# columns of the information_schema table e.g. to use in a select.
let $columns= ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS;
let $columns= ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS;
#
# Where clause for an update.
let $update_where= WHERE id=1 ;

View file

@ -320,6 +320,9 @@ NULL information_schema PROCESSLIST DB 4 NULL YES varchar 64 192 NULL NULL NULL
NULL information_schema PROCESSLIST HOST 3 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema PROCESSLIST ID 1 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) select
NULL information_schema PROCESSLIST INFO 8 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema PROCESSLIST MAX_STAGE 11 0 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2) select
NULL information_schema PROCESSLIST PROGRESS 12 0.000 NO decimal NULL NULL 7 3 NULL NULL NULL decimal(7,3) select
NULL information_schema PROCESSLIST STAGE 10 0 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2) select
NULL information_schema PROCESSLIST STATE 7 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema PROCESSLIST TIME 6 0 NO int NULL NULL 10 0 NULL NULL NULL int(7) select
NULL information_schema PROCESSLIST TIME_MS 9 0.000 NO decimal NULL NULL 22 3 NULL NULL NULL decimal(22,3) select
@ -532,6 +535,7 @@ NULL datetime NULL NULL
NULL decimal NULL NULL
NULL double NULL NULL
NULL int NULL NULL
NULL tinyint NULL NULL
--> CHAR(0) is allowed (see manual), and here both CHARACHTER_* values
--> are 0, which is intended behavior, and the result of 0 / 0 IS NULL
SELECT CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
@ -870,6 +874,9 @@ NULL information_schema PROCESSLIST TIME int NULL NULL NULL NULL int(7)
3.0000 information_schema PROCESSLIST STATE varchar 64 192 utf8 utf8_general_ci varchar(64)
1.0000 information_schema PROCESSLIST INFO longtext 4294967295 4294967295 utf8 utf8_general_ci longtext
NULL information_schema PROCESSLIST TIME_MS decimal NULL NULL NULL NULL decimal(22,3)
NULL information_schema PROCESSLIST STAGE tinyint NULL NULL NULL NULL tinyint(2)
NULL information_schema PROCESSLIST MAX_STAGE tinyint NULL NULL NULL NULL tinyint(2)
NULL information_schema PROCESSLIST PROGRESS decimal NULL NULL NULL NULL decimal(7,3)
3.0000 information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512)
3.0000 information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)

View file

@ -7,6 +7,29 @@ NULL information_schema CHARACTER_SETS CHARACTER_SET_NAME 1 NO varchar 32 96 NU
NULL information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME 2 NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32)
NULL information_schema CHARACTER_SETS DESCRIPTION 3 NO varchar 60 180 NULL NULL NULL utf8 utf8_general_ci varchar(60)
NULL information_schema CHARACTER_SETS MAXLEN 4 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(3)
NULL information_schema CLIENT_STATISTICS ACCESS_DENIED 22 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21)
NULL information_schema CLIENT_STATISTICS BINLOG_BYTES_WRITTEN 9 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21)
NULL information_schema CLIENT_STATISTICS BUSY_TIME 5 0 NO double NULL NULL 21 NULL NULL NULL NULL double
NULL information_schema CLIENT_STATISTICS BYTES_RECEIVED 7 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21)
NULL information_schema CLIENT_STATISTICS BYTES_SENT 8 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21)
NULL information_schema CLIENT_STATISTICS CLIENT 1 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
NULL information_schema CLIENT_STATISTICS COMMIT_TRANSACTIONS 18 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21)
NULL information_schema CLIENT_STATISTICS CONCURRENT_CONNECTIONS 3 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21)
NULL information_schema CLIENT_STATISTICS CONNECTED_TIME 4 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21)
NULL information_schema CLIENT_STATISTICS CPU_TIME 6 0 NO double NULL NULL 21 NULL NULL NULL NULL double
NULL information_schema CLIENT_STATISTICS DENIED_CONNECTIONS 20 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21)
NULL information_schema CLIENT_STATISTICS EMPTY_QUERIES 23 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21)
NULL information_schema CLIENT_STATISTICS LOST_CONNECTIONS 21 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21)
NULL information_schema CLIENT_STATISTICS OTHER_COMMANDS 17 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21)
NULL information_schema CLIENT_STATISTICS ROLLBACK_TRANSACTIONS 19 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21)
NULL information_schema CLIENT_STATISTICS ROWS_DELETED 12 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21)
NULL information_schema CLIENT_STATISTICS ROWS_INSERTED 13 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21)
NULL information_schema CLIENT_STATISTICS ROWS_READ 10 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21)
NULL information_schema CLIENT_STATISTICS ROWS_SENT 11 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21)
NULL information_schema CLIENT_STATISTICS ROWS_UPDATED 14 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21)
NULL information_schema CLIENT_STATISTICS SELECT_COMMANDS 15 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21)
NULL information_schema CLIENT_STATISTICS TOTAL_CONNECTIONS 2 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21)
NULL information_schema CLIENT_STATISTICS UPDATE_COMMANDS 16 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21)
NULL information_schema COLLATIONS CHARACTER_SET_NAME 2 NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32)
NULL information_schema COLLATIONS COLLATION_NAME 1 NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32)
NULL information_schema COLLATIONS ID 3 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(11)
@ -42,7 +65,7 @@ NULL information_schema COLUMN_PRIVILEGES PRIVILEGE_TYPE 6 NO varchar 64 192 NU
NULL information_schema COLUMN_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512)
NULL information_schema COLUMN_PRIVILEGES TABLE_NAME 4 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
NULL information_schema COLUMN_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
NULL information_schema ENGINES COMMENT 3 NO varchar 80 240 NULL NULL NULL utf8 utf8_general_ci varchar(80)
NULL information_schema ENGINES COMMENT 3 NO varchar 160 480 NULL NULL NULL utf8 utf8_general_ci varchar(160)
NULL information_schema ENGINES ENGINE 1 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
NULL information_schema ENGINES SAVEPOINTS 6 NULL YES varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3)
NULL information_schema ENGINES SUPPORT 2 NO varchar 8 24 NULL NULL NULL utf8 utf8_general_ci varchar(8)
@ -114,6 +137,132 @@ NULL information_schema GLOBAL_STATUS VARIABLE_NAME 1 NO varchar 64 192 NULL NU
NULL information_schema GLOBAL_STATUS VARIABLE_VALUE 2 NULL YES varchar 1024 3072 NULL NULL NULL utf8 utf8_general_ci varchar(1024)
NULL information_schema GLOBAL_VARIABLES VARIABLE_NAME 1 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
NULL information_schema GLOBAL_VARIABLES VARIABLE_VALUE 2 NULL YES varchar 1024 3072 NULL NULL NULL utf8 utf8_general_ci varchar(1024)
NULL information_schema INDEX_STATISTICS INDEX_NAME 3 NO varchar 192 576 NULL NULL NULL utf8 utf8_general_ci varchar(192)
NULL information_schema INDEX_STATISTICS ROWS_READ 4 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21)
NULL information_schema INDEX_STATISTICS TABLE_NAME 2 NO varchar 192 576 NULL NULL NULL utf8 utf8_general_ci varchar(192)
NULL information_schema INDEX_STATISTICS TABLE_SCHEMA 1 NO varchar 192 576 NULL NULL NULL utf8 utf8_general_ci varchar(192)
NULL information_schema INNODB_BUFFER_POOL_PAGES fix_count 5 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_BUFFER_POOL_PAGES flush_type 6 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_BUFFER_POOL_PAGES lru_position 4 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_BUFFER_POOL_PAGES page_no 3 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_BUFFER_POOL_PAGES page_type 1 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
NULL information_schema INNODB_BUFFER_POOL_PAGES space_id 2 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB compressed 3 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB fix_count 7 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB flush_type 8 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB lru_position 6 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB next_page_no 5 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB page_no 2 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB part_len 4 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB space_id 1 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX access_time 7 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX data_size 5 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX dirty 9 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX fix_count 12 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX flush_type 13 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX hashed 6 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX index_id 1 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX lru_position 11 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX modified 8 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX n_recs 4 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX old 10 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX page_no 3 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX space_id 2 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_CMP compress_ops 2 0 NO int NULL NULL 10 0 NULL NULL NULL int(11)
NULL information_schema INNODB_CMP compress_ops_ok 3 0 NO int NULL NULL 10 0 NULL NULL NULL int(11)
NULL information_schema INNODB_CMP compress_time 4 0 NO int NULL NULL 10 0 NULL NULL NULL int(11)
NULL information_schema INNODB_CMP page_size 1 0 NO int NULL NULL 10 0 NULL NULL NULL int(5)
NULL information_schema INNODB_CMP uncompress_ops 5 0 NO int NULL NULL 10 0 NULL NULL NULL int(11)
NULL information_schema INNODB_CMP uncompress_time 6 0 NO int NULL NULL 10 0 NULL NULL NULL int(11)
NULL information_schema INNODB_CMPMEM pages_free 3 0 NO int NULL NULL 10 0 NULL NULL NULL int(11)
NULL information_schema INNODB_CMPMEM pages_used 2 0 NO int NULL NULL 10 0 NULL NULL NULL int(11)
NULL information_schema INNODB_CMPMEM page_size 1 0 NO int NULL NULL 10 0 NULL NULL NULL int(5)
NULL information_schema INNODB_CMPMEM relocation_ops 4 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21)
NULL information_schema INNODB_CMPMEM relocation_time 5 0 NO int NULL NULL 10 0 NULL NULL NULL int(11)
NULL information_schema INNODB_CMPMEM_RESET pages_free 3 0 NO int NULL NULL 10 0 NULL NULL NULL int(11)
NULL information_schema INNODB_CMPMEM_RESET pages_used 2 0 NO int NULL NULL 10 0 NULL NULL NULL int(11)
NULL information_schema INNODB_CMPMEM_RESET page_size 1 0 NO int NULL NULL 10 0 NULL NULL NULL int(5)
NULL information_schema INNODB_CMPMEM_RESET relocation_ops 4 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21)
NULL information_schema INNODB_CMPMEM_RESET relocation_time 5 0 NO int NULL NULL 10 0 NULL NULL NULL int(11)
NULL information_schema INNODB_CMP_RESET compress_ops 2 0 NO int NULL NULL 10 0 NULL NULL NULL int(11)
NULL information_schema INNODB_CMP_RESET compress_ops_ok 3 0 NO int NULL NULL 10 0 NULL NULL NULL int(11)
NULL information_schema INNODB_CMP_RESET compress_time 4 0 NO int NULL NULL 10 0 NULL NULL NULL int(11)
NULL information_schema INNODB_CMP_RESET page_size 1 0 NO int NULL NULL 10 0 NULL NULL NULL int(5)
NULL information_schema INNODB_CMP_RESET uncompress_ops 5 0 NO int NULL NULL 10 0 NULL NULL NULL int(11)
NULL information_schema INNODB_CMP_RESET uncompress_time 6 0 NO int NULL NULL 10 0 NULL NULL NULL int(11)
NULL information_schema INNODB_INDEX_STATS fields 4 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_INDEX_STATS index_name 3 NO varchar 192 576 NULL NULL NULL utf8 utf8_general_ci varchar(192)
NULL information_schema INNODB_INDEX_STATS index_size 6 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_INDEX_STATS leaf_pages 7 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_INDEX_STATS row_per_keys 5 NO varchar 256 768 NULL NULL NULL utf8 utf8_general_ci varchar(256)
NULL information_schema INNODB_INDEX_STATS table_name 2 NO varchar 192 576 NULL NULL NULL utf8 utf8_general_ci varchar(192)
NULL information_schema INNODB_INDEX_STATS table_schema 1 NO varchar 192 576 NULL NULL NULL utf8 utf8_general_ci varchar(192)
NULL information_schema INNODB_LOCKS lock_data 10 NULL YES varchar 8192 24576 NULL NULL NULL utf8 utf8_general_ci varchar(8192)
NULL information_schema INNODB_LOCKS lock_id 1 NO varchar 81 243 NULL NULL NULL utf8 utf8_general_ci varchar(81)
NULL information_schema INNODB_LOCKS lock_index 6 NULL YES varchar 1024 3072 NULL NULL NULL utf8 utf8_general_ci varchar(1024)
NULL information_schema INNODB_LOCKS lock_mode 3 NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32)
NULL information_schema INNODB_LOCKS lock_page 8 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_LOCKS lock_rec 9 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_LOCKS lock_space 7 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_LOCKS lock_table 5 NO varchar 1024 3072 NULL NULL NULL utf8 utf8_general_ci varchar(1024)
NULL information_schema INNODB_LOCKS lock_trx_id 2 NO varchar 18 54 NULL NULL NULL utf8 utf8_general_ci varchar(18)
NULL information_schema INNODB_LOCKS lock_type 4 NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32)
NULL information_schema INNODB_LOCK_WAITS blocking_lock_id 4 NO varchar 81 243 NULL NULL NULL utf8 utf8_general_ci varchar(81)
NULL information_schema INNODB_LOCK_WAITS blocking_trx_id 3 NO varchar 18 54 NULL NULL NULL utf8 utf8_general_ci varchar(18)
NULL information_schema INNODB_LOCK_WAITS requested_lock_id 2 NO varchar 81 243 NULL NULL NULL utf8 utf8_general_ci varchar(81)
NULL information_schema INNODB_LOCK_WAITS requesting_trx_id 1 NO varchar 18 54 NULL NULL NULL utf8 utf8_general_ci varchar(18)
NULL information_schema INNODB_RSEG curr_size 6 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_RSEG max_size 5 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_RSEG page_no 4 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_RSEG rseg_id 1 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_RSEG space_id 2 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_RSEG zip_size 3 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_SYS_INDEXES ID 2 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_SYS_INDEXES NAME 3 NO varchar 192 576 NULL NULL NULL utf8 utf8_general_ci varchar(192)
NULL information_schema INNODB_SYS_INDEXES N_FIELDS 4 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_SYS_INDEXES PAGE_NO 7 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_SYS_INDEXES SPACE 6 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_SYS_INDEXES TABLE_ID 1 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_SYS_INDEXES TYPE 5 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_SYS_STATS DIFF_VALS 3 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_SYS_STATS INDEX_ID 1 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_SYS_STATS KEY_COLS 2 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_SYS_STATS NON_NULL_VALS 4 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_SYS_TABLES CLUSTER_NAME 8 NO varchar 192 576 NULL NULL NULL utf8 utf8_general_ci varchar(192)
NULL information_schema INNODB_SYS_TABLES ID 3 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_SYS_TABLES MIX_ID 6 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_SYS_TABLES MIX_LEN 7 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_SYS_TABLES NAME 2 NO varchar 192 576 NULL NULL NULL utf8 utf8_general_ci varchar(192)
NULL information_schema INNODB_SYS_TABLES N_COLS 4 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_SYS_TABLES SCHEMA 1 NO varchar 192 576 NULL NULL NULL utf8 utf8_general_ci varchar(192)
NULL information_schema INNODB_SYS_TABLES SPACE 9 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_SYS_TABLES TYPE 5 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_TABLE_STATS clust_size 4 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_TABLE_STATS modified 6 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_TABLE_STATS other_size 5 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_TABLE_STATS rows 3 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_TABLE_STATS table_name 2 NO varchar 192 576 NULL NULL NULL utf8 utf8_general_ci varchar(192)
NULL information_schema INNODB_TABLE_STATS table_schema 1 NO varchar 192 576 NULL NULL NULL utf8 utf8_general_ci varchar(192)
NULL information_schema INNODB_TRX trx_id 1 NO varchar 18 54 NULL NULL NULL utf8 utf8_general_ci varchar(18)
NULL information_schema INNODB_TRX trx_mysql_thread_id 7 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_TRX trx_query 8 NULL YES varchar 1024 3072 NULL NULL NULL utf8 utf8_general_ci varchar(1024)
NULL information_schema INNODB_TRX trx_requested_lock_id 4 NULL YES varchar 81 243 NULL NULL NULL utf8 utf8_general_ci varchar(81)
NULL information_schema INNODB_TRX trx_started 3 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL 0 NULL NULL datetime
NULL information_schema INNODB_TRX trx_state 2 NO varchar 13 39 NULL NULL NULL utf8 utf8_general_ci varchar(13)
NULL information_schema INNODB_TRX trx_wait_started 5 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime
NULL information_schema INNODB_TRX trx_weight 6 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema KEY_CACHES BLOCK_SIZE 5 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema KEY_CACHES DIRTY_BLOCKS 8 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema KEY_CACHES FULL_SIZE 4 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema KEY_CACHES KEY_CACHE_NAME 1 NO varchar 192 576 NULL NULL NULL utf8 utf8_general_ci varchar(192)
NULL information_schema KEY_CACHES READS 10 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema KEY_CACHES READ_REQUESTS 9 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema KEY_CACHES SEGMENTS 2 NULL YES int NULL NULL 10 0 NULL NULL NULL int(3) unsigned
NULL information_schema KEY_CACHES SEGMENT_NUMBER 3 NULL YES int NULL NULL 10 0 NULL NULL NULL int(3) unsigned
NULL information_schema KEY_CACHES UNUSED_BLOCKS 7 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema KEY_CACHES USED_BLOCKS 6 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema KEY_CACHES WRITES 12 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema KEY_CACHES WRITE_REQUESTS 11 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema KEY_COLUMN_USAGE COLUMN_NAME 7 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_CATALOG 1 NULL YES varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512)
NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
@ -151,11 +300,16 @@ NULL information_schema PARTITIONS TABLE_NAME 3 NO varchar 64 192 NULL NULL NUL
NULL information_schema PARTITIONS TABLE_ROWS 13 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
NULL information_schema PARTITIONS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
NULL information_schema PARTITIONS UPDATE_TIME 20 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime
NULL information_schema PBXT_STATISTICS ID 1 0 NO int NULL NULL 10 0 NULL NULL NULL int(4)
NULL information_schema PBXT_STATISTICS Name 2 NO varchar 40 120 NULL NULL NULL utf8 utf8_general_ci varchar(40)
NULL information_schema PBXT_STATISTICS Value 3 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(8)
NULL information_schema PLUGINS PLUGIN_AUTHOR 8 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
NULL information_schema PLUGINS PLUGIN_AUTH_VERSION 12 NULL YES varchar 80 240 NULL NULL NULL utf8 utf8_general_ci varchar(80)
NULL information_schema PLUGINS PLUGIN_DESCRIPTION 9 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext
NULL information_schema PLUGINS PLUGIN_LIBRARY 6 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
NULL information_schema PLUGINS PLUGIN_LIBRARY_VERSION 7 NULL YES varchar 20 60 NULL NULL NULL utf8 utf8_general_ci varchar(20)
NULL information_schema PLUGINS PLUGIN_LICENSE 10 NULL YES varchar 80 240 NULL NULL NULL utf8 utf8_general_ci varchar(80)
NULL information_schema PLUGINS PLUGIN_MATURITY 11 NULL YES varchar 12 36 NULL NULL NULL utf8 utf8_general_ci varchar(12)
NULL information_schema PLUGINS PLUGIN_NAME 1 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
NULL information_schema PLUGINS PLUGIN_STATUS 3 NO varchar 10 30 NULL NULL NULL utf8 utf8_general_ci varchar(10)
NULL information_schema PLUGINS PLUGIN_TYPE 4 NO varchar 80 240 NULL NULL NULL utf8 utf8_general_ci varchar(80)
@ -166,8 +320,12 @@ NULL information_schema PROCESSLIST DB 4 NULL YES varchar 64 192 NULL NULL NULL
NULL information_schema PROCESSLIST HOST 3 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
NULL information_schema PROCESSLIST ID 1 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4)
NULL information_schema PROCESSLIST INFO 8 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext
NULL information_schema PROCESSLIST MAX_STAGE 11 0 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2)
NULL information_schema PROCESSLIST PROGRESS 12 0.000 NO decimal NULL NULL 7 3 NULL NULL NULL decimal(7,3)
NULL information_schema PROCESSLIST STAGE 10 0 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2)
NULL information_schema PROCESSLIST STATE 7 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
NULL information_schema PROCESSLIST TIME 6 0 NO int NULL NULL 10 0 NULL NULL NULL int(7)
NULL information_schema PROCESSLIST TIME_MS 9 0.000 NO decimal NULL NULL 22 3 NULL NULL NULL decimal(22,3)
NULL information_schema PROCESSLIST USER 2 NO varchar 16 48 NULL NULL NULL utf8 utf8_general_ci varchar(16)
NULL information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL YES varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512)
NULL information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
@ -265,6 +423,11 @@ NULL information_schema TABLE_PRIVILEGES PRIVILEGE_TYPE 5 NO varchar 64 192 NUL
NULL information_schema TABLE_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512)
NULL information_schema TABLE_PRIVILEGES TABLE_NAME 4 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
NULL information_schema TABLE_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
NULL information_schema TABLE_STATISTICS ROWS_CHANGED 4 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21)
NULL information_schema TABLE_STATISTICS ROWS_CHANGED_X_INDEXES 5 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21)
NULL information_schema TABLE_STATISTICS ROWS_READ 3 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21)
NULL information_schema TABLE_STATISTICS TABLE_NAME 2 NO varchar 192 576 NULL NULL NULL utf8 utf8_general_ci varchar(192)
NULL information_schema TABLE_STATISTICS TABLE_SCHEMA 1 NO varchar 192 576 NULL NULL NULL utf8 utf8_general_ci varchar(192)
NULL information_schema TRIGGERS ACTION_CONDITION 9 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext
NULL information_schema TRIGGERS ACTION_ORDER 8 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4)
NULL information_schema TRIGGERS ACTION_ORIENTATION 11 NO varchar 9 27 NULL NULL NULL utf8 utf8_general_ci varchar(9)
@ -291,6 +454,29 @@ NULL information_schema USER_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL N
NULL information_schema USER_PRIVILEGES IS_GRANTABLE 4 NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3)
NULL information_schema USER_PRIVILEGES PRIVILEGE_TYPE 3 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
NULL information_schema USER_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512)
NULL information_schema USER_STATISTICS ACCESS_DENIED 22 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21)
NULL information_schema USER_STATISTICS BINLOG_BYTES_WRITTEN 9 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21)
NULL information_schema USER_STATISTICS BUSY_TIME 5 0 NO double NULL NULL 21 NULL NULL NULL NULL double
NULL information_schema USER_STATISTICS BYTES_RECEIVED 7 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21)
NULL information_schema USER_STATISTICS BYTES_SENT 8 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21)
NULL information_schema USER_STATISTICS COMMIT_TRANSACTIONS 18 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21)
NULL information_schema USER_STATISTICS CONCURRENT_CONNECTIONS 3 0 NO int NULL NULL 10 0 NULL NULL NULL int(11)
NULL information_schema USER_STATISTICS CONNECTED_TIME 4 0 NO int NULL NULL 10 0 NULL NULL NULL int(11)
NULL information_schema USER_STATISTICS CPU_TIME 6 0 NO double NULL NULL 21 NULL NULL NULL NULL double
NULL information_schema USER_STATISTICS DENIED_CONNECTIONS 20 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21)
NULL information_schema USER_STATISTICS EMPTY_QUERIES 23 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21)
NULL information_schema USER_STATISTICS LOST_CONNECTIONS 21 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21)
NULL information_schema USER_STATISTICS OTHER_COMMANDS 17 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21)
NULL information_schema USER_STATISTICS ROLLBACK_TRANSACTIONS 19 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21)
NULL information_schema USER_STATISTICS ROWS_DELETED 12 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21)
NULL information_schema USER_STATISTICS ROWS_INSERTED 13 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21)
NULL information_schema USER_STATISTICS ROWS_READ 10 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21)
NULL information_schema USER_STATISTICS ROWS_SENT 11 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21)
NULL information_schema USER_STATISTICS ROWS_UPDATED 14 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21)
NULL information_schema USER_STATISTICS SELECT_COMMANDS 15 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21)
NULL information_schema USER_STATISTICS TOTAL_CONNECTIONS 2 0 NO int NULL NULL 10 0 NULL NULL NULL int(11)
NULL information_schema USER_STATISTICS UPDATE_COMMANDS 16 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21)
NULL information_schema USER_STATISTICS USER 1 NO varchar 48 144 NULL NULL NULL utf8 utf8_general_ci varchar(48)
NULL information_schema VIEWS CHARACTER_SET_CLIENT 9 NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32)
NULL information_schema VIEWS CHECK_OPTION 5 NO varchar 8 24 NULL NULL NULL utf8 utf8_general_ci varchar(8)
NULL information_schema VIEWS COLLATION_CONNECTION 10 NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32)
@ -301,6 +487,11 @@ NULL information_schema VIEWS TABLE_CATALOG 1 NULL YES varchar 512 1536 NULL NUL
NULL information_schema VIEWS TABLE_NAME 3 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
NULL information_schema VIEWS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
NULL information_schema VIEWS VIEW_DEFINITION 4 NULL NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext
NULL information_schema XTRADB_ADMIN_COMMAND result_message 1 NO varchar 1024 3072 NULL NULL NULL utf8 utf8_general_ci varchar(1024)
NULL information_schema XTRADB_ENHANCEMENTS comment 3 NO varchar 100 300 NULL NULL NULL utf8 utf8_general_ci varchar(100)
NULL information_schema XTRADB_ENHANCEMENTS description 2 NO varchar 255 765 NULL NULL NULL utf8 utf8_general_ci varchar(255)
NULL information_schema XTRADB_ENHANCEMENTS link 4 NO varchar 255 765 NULL NULL NULL utf8 utf8_general_ci varchar(255)
NULL information_schema XTRADB_ENHANCEMENTS name 1 NO varchar 255 765 NULL NULL NULL utf8 utf8_general_ci varchar(255)
##########################################################################
# Show the quotient of CHARACTER_OCTET_LENGTH and CHARACTER_MAXIMUM_LENGTH
##########################################################################
@ -344,6 +535,7 @@ NULL datetime NULL NULL
NULL decimal NULL NULL
NULL double NULL NULL
NULL int NULL NULL
NULL tinyint NULL NULL
--> CHAR(0) is allowed (see manual), and here both CHARACHTER_* values
--> are 0, which is intended behavior, and the result of 0 / 0 IS NULL
SELECT CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
@ -366,28 +558,28 @@ COL_CML TABLE_SCHEMA TABLE_NAME COLUMN_NAME DATA_TYPE CHARACTER_MAXIMUM_LENGTH C
3.0000 information_schema CHARACTER_SETS DESCRIPTION varchar 60 180 utf8 utf8_general_ci varchar(60)
NULL information_schema CHARACTER_SETS MAXLEN bigint NULL NULL NULL NULL bigint(3)
3.0000 information_schema CLIENT_STATISTICS CLIENT varchar 64 192 utf8 utf8_general_ci varchar(64)
NULL information_schema CLIENT_STATISTICS TOTAL_CONNECTIONS int NULL NULL NULL NULL int(21)
NULL information_schema CLIENT_STATISTICS CONCURRENT_CONNECTIONS int NULL NULL NULL NULL int(21)
NULL information_schema CLIENT_STATISTICS CONNECTED_TIME int NULL NULL NULL NULL int(21)
NULL information_schema CLIENT_STATISTICS TOTAL_CONNECTIONS bigint NULL NULL NULL NULL bigint(21)
NULL information_schema CLIENT_STATISTICS CONCURRENT_CONNECTIONS bigint NULL NULL NULL NULL bigint(21)
NULL information_schema CLIENT_STATISTICS CONNECTED_TIME bigint NULL NULL NULL NULL bigint(21)
NULL information_schema CLIENT_STATISTICS BUSY_TIME double NULL NULL NULL NULL double
NULL information_schema CLIENT_STATISTICS CPU_TIME double NULL NULL NULL NULL double
NULL information_schema CLIENT_STATISTICS BYTES_RECEIVED int NULL NULL NULL NULL int(21)
NULL information_schema CLIENT_STATISTICS BYTES_SENT int NULL NULL NULL NULL int(21)
NULL information_schema CLIENT_STATISTICS BINLOG_BYTES_WRITTEN int NULL NULL NULL NULL int(21)
NULL information_schema CLIENT_STATISTICS ROWS_READ int NULL NULL NULL NULL int(21)
NULL information_schema CLIENT_STATISTICS ROWS_SENT int NULL NULL NULL NULL int(21)
NULL information_schema CLIENT_STATISTICS ROWS_DELETED int NULL NULL NULL NULL int(21)
NULL information_schema CLIENT_STATISTICS ROWS_INSERTED int NULL NULL NULL NULL int(21)
NULL information_schema CLIENT_STATISTICS ROWS_UPDATED int NULL NULL NULL NULL int(21)
NULL information_schema CLIENT_STATISTICS SELECT_COMMANDS int NULL NULL NULL NULL int(21)
NULL information_schema CLIENT_STATISTICS UPDATE_COMMANDS int NULL NULL NULL NULL int(21)
NULL information_schema CLIENT_STATISTICS OTHER_COMMANDS int NULL NULL NULL NULL int(21)
NULL information_schema CLIENT_STATISTICS COMMIT_TRANSACTIONS int NULL NULL NULL NULL int(21)
NULL information_schema CLIENT_STATISTICS ROLLBACK_TRANSACTIONS int NULL NULL NULL NULL int(21)
NULL information_schema CLIENT_STATISTICS DENIED_CONNECTIONS int NULL NULL NULL NULL int(21)
NULL information_schema CLIENT_STATISTICS LOST_CONNECTIONS int NULL NULL NULL NULL int(21)
NULL information_schema CLIENT_STATISTICS ACCESS_DENIED int NULL NULL NULL NULL int(21)
NULL information_schema CLIENT_STATISTICS EMPTY_QUERIES int NULL NULL NULL NULL int(21)
NULL information_schema CLIENT_STATISTICS BYTES_RECEIVED bigint NULL NULL NULL NULL bigint(21)
NULL information_schema CLIENT_STATISTICS BYTES_SENT bigint NULL NULL NULL NULL bigint(21)
NULL information_schema CLIENT_STATISTICS BINLOG_BYTES_WRITTEN bigint NULL NULL NULL NULL bigint(21)
NULL information_schema CLIENT_STATISTICS ROWS_READ bigint NULL NULL NULL NULL bigint(21)
NULL information_schema CLIENT_STATISTICS ROWS_SENT bigint NULL NULL NULL NULL bigint(21)
NULL information_schema CLIENT_STATISTICS ROWS_DELETED bigint NULL NULL NULL NULL bigint(21)
NULL information_schema CLIENT_STATISTICS ROWS_INSERTED bigint NULL NULL NULL NULL bigint(21)
NULL information_schema CLIENT_STATISTICS ROWS_UPDATED bigint NULL NULL NULL NULL bigint(21)
NULL information_schema CLIENT_STATISTICS SELECT_COMMANDS bigint NULL NULL NULL NULL bigint(21)
NULL information_schema CLIENT_STATISTICS UPDATE_COMMANDS bigint NULL NULL NULL NULL bigint(21)
NULL information_schema CLIENT_STATISTICS OTHER_COMMANDS bigint NULL NULL NULL NULL bigint(21)
NULL information_schema CLIENT_STATISTICS COMMIT_TRANSACTIONS bigint NULL NULL NULL NULL bigint(21)
NULL information_schema CLIENT_STATISTICS ROLLBACK_TRANSACTIONS bigint NULL NULL NULL NULL bigint(21)
NULL information_schema CLIENT_STATISTICS DENIED_CONNECTIONS bigint NULL NULL NULL NULL bigint(21)
NULL information_schema CLIENT_STATISTICS LOST_CONNECTIONS bigint NULL NULL NULL NULL bigint(21)
NULL information_schema CLIENT_STATISTICS ACCESS_DENIED bigint NULL NULL NULL NULL bigint(21)
NULL information_schema CLIENT_STATISTICS EMPTY_QUERIES bigint NULL NULL NULL NULL bigint(21)
3.0000 information_schema COLLATIONS COLLATION_NAME varchar 32 96 utf8 utf8_general_ci varchar(32)
3.0000 information_schema COLLATIONS CHARACTER_SET_NAME varchar 32 96 utf8 utf8_general_ci varchar(32)
NULL information_schema COLLATIONS ID bigint NULL NULL NULL NULL bigint(11)
@ -425,7 +617,7 @@ NULL information_schema COLUMNS DATETIME_PRECISION bigint NULL NULL NULL NULL bi
3.0000 information_schema COLUMN_PRIVILEGES IS_GRANTABLE varchar 3 9 utf8 utf8_general_ci varchar(3)
3.0000 information_schema ENGINES ENGINE varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema ENGINES SUPPORT varchar 8 24 utf8 utf8_general_ci varchar(8)
3.0000 information_schema ENGINES COMMENT varchar 80 240 utf8 utf8_general_ci varchar(80)
3.0000 information_schema ENGINES COMMENT varchar 160 480 utf8 utf8_general_ci varchar(160)
3.0000 information_schema ENGINES TRANSACTIONS varchar 3 9 utf8 utf8_general_ci varchar(3)
3.0000 information_schema ENGINES XA varchar 3 9 utf8 utf8_general_ci varchar(3)
3.0000 information_schema ENGINES SAVEPOINTS varchar 3 9 utf8 utf8_general_ci varchar(3)
@ -498,7 +690,7 @@ NULL information_schema FILES CHECKSUM bigint NULL NULL NULL NULL bigint(21) uns
3.0000 information_schema INDEX_STATISTICS TABLE_SCHEMA varchar 192 576 utf8 utf8_general_ci varchar(192)
3.0000 information_schema INDEX_STATISTICS TABLE_NAME varchar 192 576 utf8 utf8_general_ci varchar(192)
3.0000 information_schema INDEX_STATISTICS INDEX_NAME varchar 192 576 utf8 utf8_general_ci varchar(192)
NULL information_schema INDEX_STATISTICS ROWS_READ int NULL NULL NULL NULL int(21)
NULL information_schema INDEX_STATISTICS ROWS_READ bigint NULL NULL NULL NULL bigint(21)
3.0000 information_schema INNODB_BUFFER_POOL_PAGES page_type varchar 64 192 utf8 utf8_general_ci varchar(64)
NULL information_schema INNODB_BUFFER_POOL_PAGES space_id bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_BUFFER_POOL_PAGES page_no bigint NULL NULL NULL NULL bigint(21) unsigned
@ -513,15 +705,13 @@ NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB next_page_no bigint NULL N
NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB lru_position bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB fix_count bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB flush_type bigint NULL NULL NULL NULL bigint(21) unsigned
3.0000 information_schema INNODB_BUFFER_POOL_PAGES_INDEX schema_name varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema INNODB_BUFFER_POOL_PAGES_INDEX table_name varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema INNODB_BUFFER_POOL_PAGES_INDEX index_name varchar 64 192 utf8 utf8_general_ci varchar(64)
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX index_id bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX space_id bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX page_no bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX n_recs bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX data_size bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX hashed bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX accessed bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX access_time bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX modified bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX dirty bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX old bigint NULL NULL NULL NULL bigint(21) unsigned
@ -550,6 +740,7 @@ NULL information_schema INNODB_CMP_RESET compress_ops_ok int NULL NULL NULL NULL
NULL information_schema INNODB_CMP_RESET compress_time int NULL NULL NULL NULL int(11)
NULL information_schema INNODB_CMP_RESET uncompress_ops int NULL NULL NULL NULL int(11)
NULL information_schema INNODB_CMP_RESET uncompress_time int NULL NULL NULL NULL int(11)
3.0000 information_schema INNODB_INDEX_STATS table_schema varchar 192 576 utf8 utf8_general_ci varchar(192)
3.0000 information_schema INNODB_INDEX_STATS table_name varchar 192 576 utf8 utf8_general_ci varchar(192)
3.0000 information_schema INNODB_INDEX_STATS index_name varchar 192 576 utf8 utf8_general_ci varchar(192)
NULL information_schema INNODB_INDEX_STATS fields bigint NULL NULL NULL NULL bigint(21) unsigned
@ -576,6 +767,27 @@ NULL information_schema INNODB_RSEG zip_size bigint NULL NULL NULL NULL bigint(2
NULL information_schema INNODB_RSEG page_no bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_RSEG max_size bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_RSEG curr_size bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_SYS_INDEXES TABLE_ID bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_SYS_INDEXES ID bigint NULL NULL NULL NULL bigint(21) unsigned
3.0000 information_schema INNODB_SYS_INDEXES NAME varchar 192 576 utf8 utf8_general_ci varchar(192)
NULL information_schema INNODB_SYS_INDEXES N_FIELDS bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_SYS_INDEXES TYPE bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_SYS_INDEXES SPACE bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_SYS_INDEXES PAGE_NO bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_SYS_STATS INDEX_ID bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_SYS_STATS KEY_COLS bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_SYS_STATS DIFF_VALS bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_SYS_STATS NON_NULL_VALS bigint NULL NULL NULL NULL bigint(21) unsigned
3.0000 information_schema INNODB_SYS_TABLES SCHEMA varchar 192 576 utf8 utf8_general_ci varchar(192)
3.0000 information_schema INNODB_SYS_TABLES NAME varchar 192 576 utf8 utf8_general_ci varchar(192)
NULL information_schema INNODB_SYS_TABLES ID bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_SYS_TABLES N_COLS bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_SYS_TABLES TYPE bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_SYS_TABLES MIX_ID bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_SYS_TABLES MIX_LEN bigint NULL NULL NULL NULL bigint(21) unsigned
3.0000 information_schema INNODB_SYS_TABLES CLUSTER_NAME varchar 192 576 utf8 utf8_general_ci varchar(192)
NULL information_schema INNODB_SYS_TABLES SPACE bigint NULL NULL NULL NULL bigint(21) unsigned
3.0000 information_schema INNODB_TABLE_STATS table_schema varchar 192 576 utf8 utf8_general_ci varchar(192)
3.0000 information_schema INNODB_TABLE_STATS table_name varchar 192 576 utf8 utf8_general_ci varchar(192)
NULL information_schema INNODB_TABLE_STATS rows bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_TABLE_STATS clust_size bigint NULL NULL NULL NULL bigint(21) unsigned
@ -589,6 +801,18 @@ NULL information_schema INNODB_TRX trx_wait_started datetime NULL NULL NULL NULL
NULL information_schema INNODB_TRX trx_weight bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_TRX trx_mysql_thread_id bigint NULL NULL NULL NULL bigint(21) unsigned
3.0000 information_schema INNODB_TRX trx_query varchar 1024 3072 utf8 utf8_general_ci varchar(1024)
3.0000 information_schema KEY_CACHES KEY_CACHE_NAME varchar 192 576 utf8 utf8_general_ci varchar(192)
NULL information_schema KEY_CACHES SEGMENTS int NULL NULL NULL NULL int(3) unsigned
NULL information_schema KEY_CACHES SEGMENT_NUMBER int NULL NULL NULL NULL int(3) unsigned
NULL information_schema KEY_CACHES FULL_SIZE bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema KEY_CACHES BLOCK_SIZE bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema KEY_CACHES USED_BLOCKS bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema KEY_CACHES UNUSED_BLOCKS bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema KEY_CACHES DIRTY_BLOCKS bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema KEY_CACHES READ_REQUESTS bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema KEY_CACHES READS bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema KEY_CACHES WRITE_REQUESTS bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema KEY_CACHES WRITES bigint NULL NULL NULL NULL bigint(21) unsigned
3.0000 information_schema KEY_COLUMN_USAGE CONSTRAINT_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512)
3.0000 information_schema KEY_COLUMN_USAGE CONSTRAINT_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema KEY_COLUMN_USAGE CONSTRAINT_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
@ -626,6 +850,9 @@ NULL information_schema PARTITIONS CHECKSUM bigint NULL NULL NULL NULL bigint(21
3.0000 information_schema PARTITIONS PARTITION_COMMENT varchar 80 240 utf8 utf8_general_ci varchar(80)
3.0000 information_schema PARTITIONS NODEGROUP varchar 12 36 utf8 utf8_general_ci varchar(12)
3.0000 information_schema PARTITIONS TABLESPACE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
NULL information_schema PBXT_STATISTICS ID int NULL NULL NULL NULL int(4)
3.0000 information_schema PBXT_STATISTICS Name varchar 40 120 utf8 utf8_general_ci varchar(40)
NULL information_schema PBXT_STATISTICS Value bigint NULL NULL NULL NULL bigint(8)
3.0000 information_schema PLUGINS PLUGIN_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema PLUGINS PLUGIN_VERSION varchar 20 60 utf8 utf8_general_ci varchar(20)
3.0000 information_schema PLUGINS PLUGIN_STATUS varchar 10 30 utf8 utf8_general_ci varchar(10)
@ -636,6 +863,8 @@ NULL information_schema PARTITIONS CHECKSUM bigint NULL NULL NULL NULL bigint(21
3.0000 information_schema PLUGINS PLUGIN_AUTHOR varchar 64 192 utf8 utf8_general_ci varchar(64)
1.0000 information_schema PLUGINS PLUGIN_DESCRIPTION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext
3.0000 information_schema PLUGINS PLUGIN_LICENSE varchar 80 240 utf8 utf8_general_ci varchar(80)
3.0000 information_schema PLUGINS PLUGIN_MATURITY varchar 12 36 utf8 utf8_general_ci varchar(12)
3.0000 information_schema PLUGINS PLUGIN_AUTH_VERSION varchar 80 240 utf8 utf8_general_ci varchar(80)
NULL information_schema PROCESSLIST ID bigint NULL NULL NULL NULL bigint(4)
3.0000 information_schema PROCESSLIST USER varchar 16 48 utf8 utf8_general_ci varchar(16)
3.0000 information_schema PROCESSLIST HOST varchar 64 192 utf8 utf8_general_ci varchar(64)
@ -645,6 +874,9 @@ NULL information_schema PROCESSLIST TIME int NULL NULL NULL NULL int(7)
3.0000 information_schema PROCESSLIST STATE varchar 64 192 utf8 utf8_general_ci varchar(64)
1.0000 information_schema PROCESSLIST INFO longtext 4294967295 4294967295 utf8 utf8_general_ci longtext
NULL information_schema PROCESSLIST TIME_MS decimal NULL NULL NULL NULL decimal(22,3)
NULL information_schema PROCESSLIST STAGE tinyint NULL NULL NULL NULL tinyint(2)
NULL information_schema PROCESSLIST MAX_STAGE tinyint NULL NULL NULL NULL tinyint(2)
NULL information_schema PROCESSLIST PROGRESS decimal NULL NULL NULL NULL decimal(7,3)
3.0000 information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512)
3.0000 information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
@ -743,9 +975,9 @@ NULL information_schema TABLES CHECKSUM bigint NULL NULL NULL NULL bigint(21) un
3.0000 information_schema TABLE_PRIVILEGES IS_GRANTABLE varchar 3 9 utf8 utf8_general_ci varchar(3)
3.0000 information_schema TABLE_STATISTICS TABLE_SCHEMA varchar 192 576 utf8 utf8_general_ci varchar(192)
3.0000 information_schema TABLE_STATISTICS TABLE_NAME varchar 192 576 utf8 utf8_general_ci varchar(192)
NULL information_schema TABLE_STATISTICS ROWS_READ int NULL NULL NULL NULL int(21)
NULL information_schema TABLE_STATISTICS ROWS_CHANGED int NULL NULL NULL NULL int(21)
NULL information_schema TABLE_STATISTICS ROWS_CHANGED_X_INDEXES int NULL NULL NULL NULL int(21)
NULL information_schema TABLE_STATISTICS ROWS_READ bigint NULL NULL NULL NULL bigint(21)
NULL information_schema TABLE_STATISTICS ROWS_CHANGED bigint NULL NULL NULL NULL bigint(21)
NULL information_schema TABLE_STATISTICS ROWS_CHANGED_X_INDEXES bigint NULL NULL NULL NULL bigint(21)
3.0000 information_schema TRIGGERS TRIGGER_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512)
3.0000 information_schema TRIGGERS TRIGGER_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema TRIGGERS TRIGGER_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
@ -773,28 +1005,28 @@ NULL information_schema TRIGGERS CREATED datetime NULL NULL NULL NULL datetime
3.0000 information_schema USER_PRIVILEGES PRIVILEGE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema USER_PRIVILEGES IS_GRANTABLE varchar 3 9 utf8 utf8_general_ci varchar(3)
3.0000 information_schema USER_STATISTICS USER varchar 48 144 utf8 utf8_general_ci varchar(48)
NULL information_schema USER_STATISTICS TOTAL_CONNECTIONS int NULL NULL NULL NULL int(21)
NULL information_schema USER_STATISTICS CONCURRENT_CONNECTIONS int NULL NULL NULL NULL int(21)
NULL information_schema USER_STATISTICS CONNECTED_TIME int NULL NULL NULL NULL int(21)
NULL information_schema USER_STATISTICS TOTAL_CONNECTIONS int NULL NULL NULL NULL int(11)
NULL information_schema USER_STATISTICS CONCURRENT_CONNECTIONS int NULL NULL NULL NULL int(11)
NULL information_schema USER_STATISTICS CONNECTED_TIME int NULL NULL NULL NULL int(11)
NULL information_schema USER_STATISTICS BUSY_TIME double NULL NULL NULL NULL double
NULL information_schema USER_STATISTICS CPU_TIME double NULL NULL NULL NULL double
NULL information_schema USER_STATISTICS BYTES_RECEIVED int NULL NULL NULL NULL int(21)
NULL information_schema USER_STATISTICS BYTES_SENT int NULL NULL NULL NULL int(21)
NULL information_schema USER_STATISTICS BINLOG_BYTES_WRITTEN int NULL NULL NULL NULL int(21)
NULL information_schema USER_STATISTICS ROWS_READ int NULL NULL NULL NULL int(21)
NULL information_schema USER_STATISTICS ROWS_SENT int NULL NULL NULL NULL int(21)
NULL information_schema USER_STATISTICS ROWS_DELETED int NULL NULL NULL NULL int(21)
NULL information_schema USER_STATISTICS ROWS_INSERTED int NULL NULL NULL NULL int(21)
NULL information_schema USER_STATISTICS ROWS_UPDATED int NULL NULL NULL NULL int(21)
NULL information_schema USER_STATISTICS SELECT_COMMANDS int NULL NULL NULL NULL int(21)
NULL information_schema USER_STATISTICS UPDATE_COMMANDS int NULL NULL NULL NULL int(21)
NULL information_schema USER_STATISTICS OTHER_COMMANDS int NULL NULL NULL NULL int(21)
NULL information_schema USER_STATISTICS COMMIT_TRANSACTIONS int NULL NULL NULL NULL int(21)
NULL information_schema USER_STATISTICS ROLLBACK_TRANSACTIONS int NULL NULL NULL NULL int(21)
NULL information_schema USER_STATISTICS DENIED_CONNECTIONS int NULL NULL NULL NULL int(21)
NULL information_schema USER_STATISTICS LOST_CONNECTIONS int NULL NULL NULL NULL int(21)
NULL information_schema USER_STATISTICS ACCESS_DENIED int NULL NULL NULL NULL int(21)
NULL information_schema USER_STATISTICS EMPTY_QUERIES int NULL NULL NULL NULL int(21)
NULL information_schema USER_STATISTICS BYTES_RECEIVED bigint NULL NULL NULL NULL bigint(21)
NULL information_schema USER_STATISTICS BYTES_SENT bigint NULL NULL NULL NULL bigint(21)
NULL information_schema USER_STATISTICS BINLOG_BYTES_WRITTEN bigint NULL NULL NULL NULL bigint(21)
NULL information_schema USER_STATISTICS ROWS_READ bigint NULL NULL NULL NULL bigint(21)
NULL information_schema USER_STATISTICS ROWS_SENT bigint NULL NULL NULL NULL bigint(21)
NULL information_schema USER_STATISTICS ROWS_DELETED bigint NULL NULL NULL NULL bigint(21)
NULL information_schema USER_STATISTICS ROWS_INSERTED bigint NULL NULL NULL NULL bigint(21)
NULL information_schema USER_STATISTICS ROWS_UPDATED bigint NULL NULL NULL NULL bigint(21)
NULL information_schema USER_STATISTICS SELECT_COMMANDS bigint NULL NULL NULL NULL bigint(21)
NULL information_schema USER_STATISTICS UPDATE_COMMANDS bigint NULL NULL NULL NULL bigint(21)
NULL information_schema USER_STATISTICS OTHER_COMMANDS bigint NULL NULL NULL NULL bigint(21)
NULL information_schema USER_STATISTICS COMMIT_TRANSACTIONS bigint NULL NULL NULL NULL bigint(21)
NULL information_schema USER_STATISTICS ROLLBACK_TRANSACTIONS bigint NULL NULL NULL NULL bigint(21)
NULL information_schema USER_STATISTICS DENIED_CONNECTIONS bigint NULL NULL NULL NULL bigint(21)
NULL information_schema USER_STATISTICS LOST_CONNECTIONS bigint NULL NULL NULL NULL bigint(21)
NULL information_schema USER_STATISTICS ACCESS_DENIED bigint NULL NULL NULL NULL bigint(21)
NULL information_schema USER_STATISTICS EMPTY_QUERIES bigint NULL NULL NULL NULL bigint(21)
3.0000 information_schema VIEWS TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512)
3.0000 information_schema VIEWS TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema VIEWS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
@ -805,6 +1037,7 @@ NULL information_schema USER_STATISTICS EMPTY_QUERIES int NULL NULL NULL NULL in
3.0000 information_schema VIEWS SECURITY_TYPE varchar 7 21 utf8 utf8_general_ci varchar(7)
3.0000 information_schema VIEWS CHARACTER_SET_CLIENT varchar 32 96 utf8 utf8_general_ci varchar(32)
3.0000 information_schema VIEWS COLLATION_CONNECTION varchar 32 96 utf8 utf8_general_ci varchar(32)
3.0000 information_schema XTRADB_ADMIN_COMMAND result_message varchar 1024 3072 utf8 utf8_general_ci varchar(1024)
3.0000 information_schema XTRADB_ENHANCEMENTS name varchar 255 765 utf8 utf8_general_ci varchar(255)
3.0000 information_schema XTRADB_ENHANCEMENTS description varchar 255 765 utf8 utf8_general_ci varchar(255)
3.0000 information_schema XTRADB_ENHANCEMENTS comment varchar 100 300 utf8 utf8_general_ci varchar(100)

View file

@ -197,7 +197,7 @@ NULL mysql user Lock_tables_priv 21 N NO enum 1 3 NULL NULL NULL utf8 utf8_gener
NULL mysql user max_connections 38 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned select,insert,update,references
NULL mysql user max_questions 36 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned select,insert,update,references
NULL mysql user max_updates 37 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned select,insert,update,references
NULL mysql user max_user_connections 39 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned select,insert,update,references
NULL mysql user max_user_connections 39 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
NULL mysql user Password 3 NO char 41 41 NULL NULL NULL latin1 latin1_bin char(41) select,insert,update,references
NULL mysql user plugin 40 NO char 60 60 NULL NULL NULL latin1 latin1_swedish_ci char(60) select,insert,update,references
NULL mysql user Process_priv 12 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
@ -499,6 +499,6 @@ NULL mysql time_zone_transition_type Is_DST tinyint NULL NULL NULL NULL tinyint(
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) unsigned
NULL mysql user max_user_connections int NULL NULL NULL NULL int(11)
1.0000 mysql user plugin char 60 60 latin1 latin1_swedish_ci char(60)
1.0000 mysql user auth_string text 65535 65535 utf8 utf8_bin text

View file

@ -49,7 +49,7 @@ NULL mysql event modified 9 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL
NULL mysql event name 2 NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) PRI
NULL mysql event on_completion 14 DROP NO enum 8 24 NULL NULL NULL utf8 utf8_general_ci enum('DROP','PRESERVE')
NULL mysql event originator 17 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned
NULL mysql event sql_mode 15 NO set 478 1434 NULL NULL NULL utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH')
NULL mysql event sql_mode 15 NO set 494 1482 NULL NULL NULL utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH')
NULL mysql event starts 11 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime
NULL mysql event status 13 ENABLED NO enum 18 54 NULL NULL NULL utf8 utf8_general_ci enum('ENABLED','DISABLED','SLAVESIDE_DISABLED')
NULL mysql event time_zone 18 SYSTEM NO char 64 64 NULL NULL NULL latin1 latin1_swedish_ci char(64)
@ -59,7 +59,7 @@ NULL mysql func ret 2 0 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(1)
NULL mysql func type 4 NULL NO enum 9 27 NULL NULL NULL utf8 utf8_general_ci enum('function','aggregate')
NULL mysql general_log argument 6 NULL NO mediumtext 16777215 16777215 NULL NULL NULL utf8 utf8_general_ci mediumtext
NULL mysql general_log command_type 5 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
NULL mysql general_log event_time 1 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update CURRENT_TIMESTAMP
NULL mysql general_log event_time 1 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL 6 NULL NULL timestamp(6) on update CURRENT_TIMESTAMP
NULL mysql general_log server_id 4 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned
NULL mysql general_log thread_id 3 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11)
NULL mysql general_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NULL NULL utf8 utf8_general_ci mediumtext
@ -124,7 +124,7 @@ NULL mysql proc returns 10 NULL NO longblob 4294967295 4294967295 NULL NULL NULL
NULL mysql proc security_type 8 DEFINER NO enum 7 21 NULL NULL NULL utf8 utf8_general_ci enum('INVOKER','DEFINER')
NULL mysql proc specific_name 4 NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64)
NULL mysql proc sql_data_access 6 CONTAINS_SQL NO enum 17 51 NULL NULL NULL utf8 utf8_general_ci enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA')
NULL mysql proc sql_mode 15 NO set 478 1434 NULL NULL NULL utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH')
NULL mysql proc sql_mode 15 NO set 494 1482 NULL NULL NULL utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH')
NULL mysql proc type 3 NULL NO enum 9 27 NULL NULL NULL utf8 utf8_general_ci enum('FUNCTION','PROCEDURE') PRI
NULL mysql procs_priv Db 2 NO char 64 192 NULL NULL NULL utf8 utf8_bin char(64) PRI
NULL mysql procs_priv Grantor 6 NO char 77 231 NULL NULL NULL utf8 utf8_bin char(77) MUL
@ -146,13 +146,13 @@ NULL mysql servers Wrapper 8 NO char 64 192 NULL NULL NULL utf8 utf8_general_ci
NULL mysql slow_log db 7 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512)
NULL mysql slow_log insert_id 9 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11)
NULL mysql slow_log last_insert_id 8 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11)
NULL mysql slow_log lock_time 4 NULL NO time NULL NULL NULL NULL 0 NULL NULL time
NULL mysql slow_log query_time 3 NULL NO time NULL NULL NULL NULL 0 NULL NULL time
NULL mysql slow_log lock_time 4 NULL NO time NULL NULL NULL NULL 6 NULL NULL time(6)
NULL mysql slow_log query_time 3 NULL NO time NULL NULL NULL NULL 6 NULL NULL time(6)
NULL mysql slow_log rows_examined 6 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11)
NULL mysql slow_log rows_sent 5 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11)
NULL mysql slow_log server_id 10 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned
NULL mysql slow_log sql_text 11 NULL NO mediumtext 16777215 16777215 NULL NULL NULL utf8 utf8_general_ci mediumtext
NULL mysql slow_log start_time 1 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update CURRENT_TIMESTAMP
NULL mysql slow_log start_time 1 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL 6 NULL NULL timestamp(6) on update CURRENT_TIMESTAMP
NULL mysql slow_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NULL NULL utf8 utf8_general_ci mediumtext
NULL mysql tables_priv Column_priv 8 NO set 31 93 NULL NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','References')
NULL mysql tables_priv Db 2 NO char 64 192 NULL NULL NULL utf8 utf8_bin char(64) PRI
@ -178,6 +178,7 @@ NULL mysql time_zone_transition_type Time_zone_id 1 NULL NO int NULL NULL 10 0 N
NULL mysql time_zone_transition_type Transition_type_id 2 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI
NULL mysql user Alter_priv 17 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y')
NULL mysql user Alter_routine_priv 28 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y')
NULL mysql user auth_string 41 NULL NO text 65535 65535 NULL NULL NULL utf8 utf8_bin text
NULL mysql user Create_priv 8 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y')
NULL mysql user Create_routine_priv 27 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y')
NULL mysql user Create_tmp_table_priv 20 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y')
@ -198,6 +199,7 @@ NULL mysql user max_questions 36 0 NO int NULL NULL 10 0 NULL NULL NULL int(11)
NULL mysql user max_updates 37 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned
NULL mysql user max_user_connections 39 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned
NULL mysql user Password 3 NO char 41 41 NULL NULL NULL latin1 latin1_bin char(41)
NULL mysql user plugin 40 NO char 60 60 NULL NULL NULL latin1 latin1_swedish_ci char(60)
NULL mysql user Process_priv 12 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y')
NULL mysql user References_priv 15 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y')
NULL mysql user Reload_priv 10 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y')
@ -233,6 +235,7 @@ COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME
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
SELECT DISTINCT
@ -327,7 +330,7 @@ NULL mysql event starts datetime NULL NULL NULL NULL datetime
NULL mysql event ends datetime NULL NULL NULL NULL datetime
3.0000 mysql event status enum 18 54 utf8 utf8_general_ci enum('ENABLED','DISABLED','SLAVESIDE_DISABLED')
3.0000 mysql event on_completion enum 8 24 utf8 utf8_general_ci enum('DROP','PRESERVE')
3.0000 mysql event sql_mode set 478 1434 utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH')
3.0000 mysql event sql_mode set 494 1482 utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH')
3.0000 mysql event comment char 64 192 utf8 utf8_bin char(64)
NULL mysql event originator int NULL NULL NULL NULL int(10) unsigned
1.0000 mysql event time_zone char 64 64 latin1 latin1_swedish_ci char(64)
@ -339,7 +342,7 @@ NULL mysql event originator int NULL NULL NULL NULL int(10) unsigned
NULL mysql func ret tinyint NULL NULL NULL NULL tinyint(1)
3.0000 mysql func dl char 128 384 utf8 utf8_bin char(128)
3.0000 mysql func type enum 9 27 utf8 utf8_general_ci enum('function','aggregate')
NULL mysql general_log event_time timestamp NULL NULL NULL NULL timestamp
NULL mysql general_log event_time timestamp NULL NULL NULL NULL timestamp(6)
1.0000 mysql general_log user_host mediumtext 16777215 16777215 utf8 utf8_general_ci mediumtext
NULL mysql general_log thread_id int NULL NULL NULL NULL int(11)
NULL mysql general_log server_id int NULL NULL NULL NULL int(10) unsigned
@ -402,7 +405,7 @@ NULL mysql ndb_binlog_index schemaops bigint NULL NULL NULL NULL bigint(20) unsi
3.0000 mysql proc definer char 77 231 utf8 utf8_bin char(77)
NULL mysql proc created timestamp NULL NULL NULL NULL timestamp
NULL mysql proc modified timestamp NULL NULL NULL NULL timestamp
3.0000 mysql proc sql_mode set 478 1434 utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH')
3.0000 mysql proc sql_mode set 494 1482 utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH')
3.0000 mysql proc comment char 64 192 utf8 utf8_bin char(64)
3.0000 mysql proc character_set_client char 32 96 utf8 utf8_bin char(32)
3.0000 mysql proc collation_connection char 32 96 utf8 utf8_bin char(32)
@ -425,10 +428,10 @@ NULL mysql servers Port int NULL NULL NULL NULL int(4)
3.0000 mysql servers Socket char 64 192 utf8 utf8_general_ci char(64)
3.0000 mysql servers Wrapper char 64 192 utf8 utf8_general_ci char(64)
3.0000 mysql servers Owner char 64 192 utf8 utf8_general_ci char(64)
NULL mysql slow_log start_time timestamp NULL NULL NULL NULL timestamp
NULL mysql slow_log start_time timestamp NULL NULL NULL NULL timestamp(6)
1.0000 mysql slow_log user_host mediumtext 16777215 16777215 utf8 utf8_general_ci mediumtext
NULL mysql slow_log query_time time NULL NULL NULL NULL time
NULL mysql slow_log lock_time time NULL NULL NULL NULL time
NULL mysql slow_log query_time time NULL NULL NULL NULL time(6)
NULL mysql slow_log lock_time time NULL NULL NULL NULL time(6)
NULL mysql slow_log rows_sent int NULL NULL NULL NULL int(11)
NULL mysql slow_log rows_examined int NULL NULL NULL NULL int(11)
3.0000 mysql slow_log db varchar 512 1536 utf8 utf8_general_ci varchar(512)
@ -497,3 +500,5 @@ 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) unsigned
1.0000 mysql user plugin char 60 60 latin1 latin1_swedish_ci char(60)
1.0000 mysql user auth_string text 65535 65535 utf8 utf8_bin text

View file

@ -38,6 +38,29 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME CLIENT_STATISTICS
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
INDEX_LENGTH #IL#
DATA_FREE #DF#
AUTO_INCREMENT NULL
CREATE_TIME #CRT#
UPDATE_TIME #UT#
CHECK_TIME #CT#
TABLE_COLLATION utf8_general_ci
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME COLLATIONS
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
@ -245,6 +268,29 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME INDEX_STATISTICS
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
INDEX_LENGTH #IL#
DATA_FREE #DF#
AUTO_INCREMENT NULL
CREATE_TIME #CRT#
UPDATE_TIME #UT#
CHECK_TIME #CT#
TABLE_COLLATION utf8_general_ci
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME INNODB_BUFFER_POOL_PAGES
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
@ -498,6 +544,75 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME INNODB_SYS_INDEXES
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
INDEX_LENGTH #IL#
DATA_FREE #DF#
AUTO_INCREMENT NULL
CREATE_TIME #CRT#
UPDATE_TIME #UT#
CHECK_TIME #CT#
TABLE_COLLATION utf8_general_ci
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME INNODB_SYS_STATS
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
INDEX_LENGTH #IL#
DATA_FREE #DF#
AUTO_INCREMENT NULL
CREATE_TIME #CRT#
UPDATE_TIME #UT#
CHECK_TIME #CT#
TABLE_COLLATION utf8_general_ci
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME INNODB_SYS_TABLES
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
INDEX_LENGTH #IL#
DATA_FREE #DF#
AUTO_INCREMENT NULL
CREATE_TIME #CRT#
UPDATE_TIME #UT#
CHECK_TIME #CT#
TABLE_COLLATION utf8_general_ci
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME INNODB_TABLE_STATS
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
@ -544,6 +659,29 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME KEY_CACHES
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
INDEX_LENGTH #IL#
DATA_FREE #DF#
AUTO_INCREMENT NULL
CREATE_TIME #CRT#
UPDATE_TIME #UT#
CHECK_TIME #CT#
TABLE_COLLATION utf8_general_ci
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME KEY_COLUMN_USAGE
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
@ -590,6 +728,29 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME PBXT_STATISTICS
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
INDEX_LENGTH #IL#
DATA_FREE #DF#
AUTO_INCREMENT NULL
CREATE_TIME #CRT#
UPDATE_TIME #UT#
CHECK_TIME #CT#
TABLE_COLLATION utf8_general_ci
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME PLUGINS
TABLE_TYPE SYSTEM VIEW
ENGINE MYISAM_OR_MARIA
@ -866,6 +1027,29 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME TABLE_STATISTICS
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
INDEX_LENGTH #IL#
DATA_FREE #DF#
AUTO_INCREMENT NULL
CREATE_TIME #CRT#
UPDATE_TIME #UT#
CHECK_TIME #CT#
TABLE_COLLATION utf8_general_ci
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME TRIGGERS
TABLE_TYPE SYSTEM VIEW
ENGINE MYISAM_OR_MARIA
@ -912,6 +1096,29 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME USER_STATISTICS
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
INDEX_LENGTH #IL#
DATA_FREE #DF#
AUTO_INCREMENT NULL
CREATE_TIME #CRT#
UPDATE_TIME #UT#
CHECK_TIME #CT#
TABLE_COLLATION utf8_general_ci
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME VIEWS
TABLE_TYPE SYSTEM VIEW
ENGINE MYISAM_OR_MARIA
@ -935,6 +1142,29 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME XTRADB_ADMIN_COMMAND
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
INDEX_LENGTH #IL#
DATA_FREE #DF#
AUTO_INCREMENT NULL
CREATE_TIME #CRT#
UPDATE_TIME #UT#
CHECK_TIME #CT#
TABLE_COLLATION utf8_general_ci
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME XTRADB_ENHANCEMENTS
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
@ -998,6 +1228,29 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME CLIENT_STATISTICS
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
INDEX_LENGTH #IL#
DATA_FREE #DF#
AUTO_INCREMENT NULL
CREATE_TIME #CRT#
UPDATE_TIME #UT#
CHECK_TIME #CT#
TABLE_COLLATION utf8_general_ci
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME COLLATIONS
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
@ -1205,6 +1458,29 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME INDEX_STATISTICS
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
INDEX_LENGTH #IL#
DATA_FREE #DF#
AUTO_INCREMENT NULL
CREATE_TIME #CRT#
UPDATE_TIME #UT#
CHECK_TIME #CT#
TABLE_COLLATION utf8_general_ci
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME INNODB_BUFFER_POOL_PAGES
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
@ -1458,6 +1734,75 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME INNODB_SYS_INDEXES
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
INDEX_LENGTH #IL#
DATA_FREE #DF#
AUTO_INCREMENT NULL
CREATE_TIME #CRT#
UPDATE_TIME #UT#
CHECK_TIME #CT#
TABLE_COLLATION utf8_general_ci
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME INNODB_SYS_STATS
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
INDEX_LENGTH #IL#
DATA_FREE #DF#
AUTO_INCREMENT NULL
CREATE_TIME #CRT#
UPDATE_TIME #UT#
CHECK_TIME #CT#
TABLE_COLLATION utf8_general_ci
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME INNODB_SYS_TABLES
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
INDEX_LENGTH #IL#
DATA_FREE #DF#
AUTO_INCREMENT NULL
CREATE_TIME #CRT#
UPDATE_TIME #UT#
CHECK_TIME #CT#
TABLE_COLLATION utf8_general_ci
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME INNODB_TABLE_STATS
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
@ -1504,6 +1849,29 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME KEY_CACHES
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
INDEX_LENGTH #IL#
DATA_FREE #DF#
AUTO_INCREMENT NULL
CREATE_TIME #CRT#
UPDATE_TIME #UT#
CHECK_TIME #CT#
TABLE_COLLATION utf8_general_ci
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME KEY_COLUMN_USAGE
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
@ -1550,6 +1918,29 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME PBXT_STATISTICS
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
INDEX_LENGTH #IL#
DATA_FREE #DF#
AUTO_INCREMENT NULL
CREATE_TIME #CRT#
UPDATE_TIME #UT#
CHECK_TIME #CT#
TABLE_COLLATION utf8_general_ci
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME PLUGINS
TABLE_TYPE SYSTEM VIEW
ENGINE MYISAM_OR_MARIA
@ -1826,6 +2217,29 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME TABLE_STATISTICS
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
INDEX_LENGTH #IL#
DATA_FREE #DF#
AUTO_INCREMENT NULL
CREATE_TIME #CRT#
UPDATE_TIME #UT#
CHECK_TIME #CT#
TABLE_COLLATION utf8_general_ci
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME TRIGGERS
TABLE_TYPE SYSTEM VIEW
ENGINE MYISAM_OR_MARIA
@ -1872,6 +2286,29 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME USER_STATISTICS
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
INDEX_LENGTH #IL#
DATA_FREE #DF#
AUTO_INCREMENT NULL
CREATE_TIME #CRT#
UPDATE_TIME #UT#
CHECK_TIME #CT#
TABLE_COLLATION utf8_general_ci
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME VIEWS
TABLE_TYPE SYSTEM VIEW
ENGINE MYISAM_OR_MARIA
@ -1895,6 +2332,29 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME XTRADB_ADMIN_COMMAND
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
INDEX_LENGTH #IL#
DATA_FREE #DF#
AUTO_INCREMENT NULL
CREATE_TIME #CRT#
UPDATE_TIME #UT#
CHECK_TIME #CT#
TABLE_COLLATION utf8_general_ci
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
TABLE_NAME XTRADB_ENHANCEMENTS
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY

View file

@ -30,28 +30,31 @@ PROCESSLIST CREATE TEMPORARY TABLE `PROCESSLIST` (
`TIME` int(7) NOT NULL DEFAULT '0',
`STATE` varchar(64) DEFAULT NULL,
`INFO` longtext,
`TIME_MS` decimal(22,3) NOT NULL DEFAULT '0.000'
`TIME_MS` decimal(22,3) NOT NULL DEFAULT '0.000',
`STAGE` tinyint(2) NOT NULL DEFAULT '0',
`MAX_STAGE` tinyint(2) NOT NULL DEFAULT '0',
`PROGRESS` decimal(7,3) NOT NULL DEFAULT '0.000'
) DEFAULT CHARSET=utf8
SHOW processlist;
Id User Host db Command Time State Info
ID root HOST_NAME information_schema Query TIME NULL SHOW processlist
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
Id User Host db Command Time State Info Progress
ID root HOST_NAME information_schema Query TIME NULL SHOW processlist TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
SELECT * FROM processlist ORDER BY id;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS
ID root HOST_NAME information_schema Query TIME executing SELECT * FROM processlist ORDER BY id TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS FROM processlist ORDER BY id;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS
ID root HOST_NAME information_schema Query TIME executing SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS FROM processlist ORDER BY id TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS
ID root HOST_NAME information_schema Query TIME executing SELECT * FROM processlist ORDER BY id TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS FROM processlist ORDER BY id;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS
ID root HOST_NAME information_schema Query TIME executing SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS FROM processlist ORDER BY id TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
CREATE TEMPORARY TABLE test.t_processlist AS SELECT * FROM processlist;
UPDATE test.t_processlist SET user='horst' WHERE id=1 ;
INSERT INTO processlist SELECT * FROM test.t_processlist;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
DROP TABLE test.t_processlist;
CREATE VIEW test.v_processlist (ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS) AS SELECT * FROM processlist WITH CHECK OPTION;
CREATE VIEW test.v_processlist (ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS) AS SELECT * FROM processlist WITH CHECK OPTION;
ERROR HY000: CHECK OPTION on non-updatable view 'test.v_processlist'
CREATE VIEW test.v_processlist (ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS) AS SELECT * FROM processlist;
CREATE VIEW test.v_processlist (ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS) AS SELECT * FROM processlist;
DROP VIEW test.v_processlist;
UPDATE processlist SET user='any_user' WHERE id=1 ;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
@ -99,25 +102,28 @@ PROCESSLIST CREATE TEMPORARY TABLE `PROCESSLIST` (
`TIME` int(7) NOT NULL DEFAULT '0',
`STATE` varchar(64) DEFAULT NULL,
`INFO` longtext,
`TIME_MS` decimal(22,3) NOT NULL DEFAULT '0.000'
`TIME_MS` decimal(22,3) NOT NULL DEFAULT '0.000',
`STAGE` tinyint(2) NOT NULL DEFAULT '0',
`MAX_STAGE` tinyint(2) NOT NULL DEFAULT '0',
`PROGRESS` decimal(7,3) NOT NULL DEFAULT '0.000'
) DEFAULT CHARSET=utf8
SHOW processlist;
Id User Host db Command Time State Info
ID ddicttestuser1 HOST_NAME information_schema Query TIME NULL SHOW processlist
Id User Host db Command Time State Info Progress
ID ddicttestuser1 HOST_NAME information_schema Query TIME NULL SHOW processlist TIME_MS
SELECT * FROM processlist ORDER BY id;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Query TIME executing SELECT * FROM processlist ORDER BY id TIME_MS
SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS FROM processlist ORDER BY id;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Query TIME executing SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS FROM processlist ORDER BY id TIME_MS
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS
ID ddicttestuser1 HOST_NAME information_schema Query TIME executing SELECT * FROM processlist ORDER BY id TIME_MS 0 0 0.000
SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS FROM processlist ORDER BY id;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS
ID ddicttestuser1 HOST_NAME information_schema Query TIME executing SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS FROM processlist ORDER BY id TIME_MS 0 0 0.000
CREATE TEMPORARY TABLE test.t_processlist AS SELECT * FROM processlist;
UPDATE test.t_processlist SET user='horst' WHERE id=1 ;
INSERT INTO processlist SELECT * FROM test.t_processlist;
ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema'
DROP TABLE test.t_processlist;
CREATE VIEW test.v_processlist (ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS) AS SELECT * FROM processlist WITH CHECK OPTION;
CREATE VIEW test.v_processlist (ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS) AS SELECT * FROM processlist WITH CHECK OPTION;
ERROR HY000: CHECK OPTION on non-updatable view 'test.v_processlist'
CREATE VIEW test.v_processlist (ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS) AS SELECT * FROM processlist;
CREATE VIEW test.v_processlist (ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS) AS SELECT * FROM processlist;
DROP VIEW test.v_processlist;
UPDATE processlist SET user='any_user' WHERE id=1 ;
ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema'
@ -165,11 +171,11 @@ SHOW GRANTS;
Grants for ddicttestuser1@localhost
GRANT PROCESS ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1'
SHOW processlist;
Id User Host db Command Time State Info
ID ddicttestuser1 HOST_NAME information_schema Query TIME NULL SHOW processlist
Id User Host db Command Time State Info Progress
ID ddicttestuser1 HOST_NAME information_schema Query TIME NULL SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist TIME_MS
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS
ID ddicttestuser1 HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000
####################################################################################
4.2 New connection con101 (ddicttestuser1 with PROCESS privilege)
SHOW/SELECT shows all processes/threads.
@ -178,15 +184,15 @@ SHOW GRANTS;
Grants for ddicttestuser1@localhost
GRANT PROCESS ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1'
SHOW processlist;
Id User Host db Command Time State Info
ID root HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Query TIME NULL SHOW processlist
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
Id User Host db Command Time State Info Progress
ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Query TIME NULL SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS
ID ddicttestuser1 HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
####################################################################################
5 Grant PROCESS privilege to anonymous user.
connection default (user=root)
@ -201,17 +207,17 @@ SHOW GRANTS;
Grants for @localhost
GRANT PROCESS ON *.* TO ''@'localhost'
SHOW processlist;
Id User Host db Command Time State Info
ID root HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID HOST_NAME information_schema Query TIME NULL SHOW processlist
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS
ID HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
Id User Host db Command Time State Info Progress
ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID HOST_NAME information_schema Query TIME NULL SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS
ID HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
####################################################################################
6 Revoke PROCESS privilege from ddicttestuser1
connection default (user=root)
@ -226,15 +232,15 @@ SHOW GRANTS;
Grants for ddicttestuser1@localhost
GRANT USAGE ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1'
SHOW processlist;
Id User Host db Command Time State Info
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Query TIME NULL SHOW processlist
Id User Host db Command Time State Info Progress
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Query TIME NULL SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS
ID ddicttestuser1 HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
####################################################################################
7 Revoke PROCESS privilege from anonymous user
connection default (user=root)
@ -249,9 +255,9 @@ SHOW GRANTS FOR ''@'localhost';
Grants for @localhost
GRANT USAGE ON *.* TO ''@'localhost'
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS
ID HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist TIME_MS
ID HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS
ID HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000
ID HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
####################################################################################
8 Grant SUPER (does not imply PROCESS) privilege to ddicttestuser1
connection default (user=root)
@ -265,17 +271,17 @@ SHOW GRANTS FOR 'ddicttestuser1'@'localhost';
Grants for ddicttestuser1@localhost
GRANT SUPER ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1'
SHOW processlist;
Id User Host db Command Time State Info
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Query TIME NULL SHOW processlist
Id User Host db Command Time State Info Progress
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Query TIME NULL SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS
ID ddicttestuser1 HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
####################################################################################
9 Revoke SUPER privilege from user ddicttestuser1
connection default (user=root)
@ -290,19 +296,19 @@ SHOW GRANTS FOR 'ddicttestuser1'@'localhost';
Grants for ddicttestuser1@localhost
GRANT USAGE ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1'
SHOW processlist;
Id User Host db Command Time State Info
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Query TIME NULL SHOW processlist
Id User Host db Command Time State Info Progress
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Query TIME NULL SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS
ID ddicttestuser1 HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
####################################################################################
10 Grant SUPER privilege with grant option to user ddicttestuser1.
connection default (user=root)
@ -338,31 +344,31 @@ SHOW GRANTS FOR 'ddicttestuser2'@'localhost';
Grants for ddicttestuser2@localhost
GRANT PROCESS ON *.* TO 'ddicttestuser2'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1'
SHOW processlist;
Id User Host db Command Time State Info
ID root HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser2 HOST_NAME information_schema Query TIME NULL SHOW processlist
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS
ID ddicttestuser2 HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
Id User Host db Command Time State Info Progress
ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser2 HOST_NAME information_schema Query TIME NULL SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS
ID ddicttestuser2 HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
####################################################################################
11 User ddicttestuser1 revokes PROCESS privilege from user ddicttestuser2
connection ddicttestuser1;
@ -376,13 +382,13 @@ SHOW GRANTS;
Grants for ddicttestuser2@localhost
GRANT USAGE ON *.* TO 'ddicttestuser2'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1'
SHOW processlist;
Id User Host db Command Time State Info
ID ddicttestuser2 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser2 HOST_NAME information_schema Query TIME NULL SHOW processlist
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS
ID ddicttestuser2 HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist TIME_MS
Id User Host db Command Time State Info Progress
ID ddicttestuser2 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser2 HOST_NAME information_schema Query TIME NULL SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS
ID ddicttestuser2 HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000
ID ddicttestuser2 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
####################################################################################
11.2 Revoke SUPER,PROCESS,GRANT OPTION privilege from user ddicttestuser1
connection default (user=root)
@ -399,25 +405,25 @@ GRANT USAGE ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD '*22DA
GRANT PROCESS ON *.* TO 'ddicttestuser2'@'localhost';
ERROR 28000: Access denied for user 'ddicttestuser1'@'localhost' (using password: YES)
SHOW processlist;
Id User Host db Command Time State Info
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Query TIME NULL SHOW processlist
Id User Host db Command Time State Info Progress
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Query TIME NULL SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS
ID ddicttestuser1 HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
####################################################################################
12 Revoke the SELECT privilege from user ddicttestuser1
connection default (user=root)
@ -434,27 +440,27 @@ SHOW GRANTS FOR 'ddicttestuser1'@'localhost';
Grants for ddicttestuser1@localhost
GRANT USAGE ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1'
SHOW processlist;
Id User Host db Command Time State Info
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Query TIME NULL SHOW processlist
Id User Host db Command Time State Info Progress
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Query TIME NULL SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS
ID ddicttestuser1 HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
####################################################################################
12.2 Revoke only the SELECT privilege on the information_schema from ddicttestuser1.
connection default (user=root)

View file

@ -29,30 +29,32 @@ PROCESSLIST CREATE TEMPORARY TABLE `PROCESSLIST` (
`COMMAND` varchar(16) NOT NULL DEFAULT '',
`TIME` int(7) NOT NULL DEFAULT '0',
`STATE` varchar(64) DEFAULT NULL,
`INFO` longtext
`INFO` longtext,
`TIME_MS` decimal(22,3) NOT NULL DEFAULT '0.000',
`STAGE` tinyint(2) NOT NULL DEFAULT '0',
`MAX_STAGE` tinyint(2) NOT NULL DEFAULT '0',
`PROGRESS` decimal(7,3) NOT NULL DEFAULT '0.000'
) DEFAULT CHARSET=utf8
SHOW processlist;
Id User Host db Command Time State Info
ID root HOST_NAME information_schema Query TIME NULL SHOW processlist
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
Id User Host db Command Time State Info Progress
ID root HOST_NAME information_schema Query TIME NULL SHOW processlist TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
SELECT * FROM processlist ORDER BY id;
ID USER HOST DB COMMAND TIME STATE INFO
ID root HOST_NAME information_schema Execute TIME executing SELECT * FROM processlist ORDER BY id
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO FROM processlist ORDER BY id;
ID USER HOST DB COMMAND TIME STATE INFO
ID root HOST_NAME information_schema Execute TIME executing SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO FROM processlist ORDER BY id
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS
ID root HOST_NAME information_schema Execute TIME executing SELECT * FROM processlist ORDER BY id TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS FROM processlist ORDER BY id;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS
ID root HOST_NAME information_schema Execute TIME executing SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS FROM processlist ORDER BY id TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
CREATE TEMPORARY TABLE test.t_processlist AS SELECT * FROM processlist;
UPDATE test.t_processlist SET user='horst' WHERE id=1 ;
INSERT INTO processlist SELECT * FROM test.t_processlist;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
DROP TABLE test.t_processlist;
CREATE VIEW test.v_processlist (ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO) AS SELECT * FROM processlist WITH CHECK OPTION;
CREATE VIEW test.v_processlist (ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS) AS SELECT * FROM processlist WITH CHECK OPTION;
ERROR HY000: CHECK OPTION on non-updatable view 'test.v_processlist'
CREATE VIEW test.v_processlist (ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO) AS SELECT * FROM processlist;
UPDATE test.v_processlist SET TIME=NOW() WHERE id = 1;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
CREATE VIEW test.v_processlist (ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS) AS SELECT * FROM processlist;
DROP VIEW test.v_processlist;
UPDATE processlist SET user='any_user' WHERE id=1 ;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
@ -99,27 +101,29 @@ PROCESSLIST CREATE TEMPORARY TABLE `PROCESSLIST` (
`COMMAND` varchar(16) NOT NULL DEFAULT '',
`TIME` int(7) NOT NULL DEFAULT '0',
`STATE` varchar(64) DEFAULT NULL,
`INFO` longtext
`INFO` longtext,
`TIME_MS` decimal(22,3) NOT NULL DEFAULT '0.000',
`STAGE` tinyint(2) NOT NULL DEFAULT '0',
`MAX_STAGE` tinyint(2) NOT NULL DEFAULT '0',
`PROGRESS` decimal(7,3) NOT NULL DEFAULT '0.000'
) DEFAULT CHARSET=utf8
SHOW processlist;
Id User Host db Command Time State Info
ID ddicttestuser1 HOST_NAME information_schema Query TIME NULL SHOW processlist
Id User Host db Command Time State Info Progress
ID ddicttestuser1 HOST_NAME information_schema Query TIME NULL SHOW processlist TIME_MS
SELECT * FROM processlist ORDER BY id;
ID USER HOST DB COMMAND TIME STATE INFO
ID ddicttestuser1 HOST_NAME information_schema Execute TIME executing SELECT * FROM processlist ORDER BY id
SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO FROM processlist ORDER BY id;
ID USER HOST DB COMMAND TIME STATE INFO
ID ddicttestuser1 HOST_NAME information_schema Execute TIME executing SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO FROM processlist ORDER BY id
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS
ID ddicttestuser1 HOST_NAME information_schema Execute TIME executing SELECT * FROM processlist ORDER BY id TIME_MS 0 0 0.000
SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS FROM processlist ORDER BY id;
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS
ID ddicttestuser1 HOST_NAME information_schema Execute TIME executing SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS FROM processlist ORDER BY id TIME_MS 0 0 0.000
CREATE TEMPORARY TABLE test.t_processlist AS SELECT * FROM processlist;
UPDATE test.t_processlist SET user='horst' WHERE id=1 ;
INSERT INTO processlist SELECT * FROM test.t_processlist;
ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema'
DROP TABLE test.t_processlist;
CREATE VIEW test.v_processlist (ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO) AS SELECT * FROM processlist WITH CHECK OPTION;
CREATE VIEW test.v_processlist (ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS) AS SELECT * FROM processlist WITH CHECK OPTION;
ERROR HY000: CHECK OPTION on non-updatable view 'test.v_processlist'
CREATE VIEW test.v_processlist (ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO) AS SELECT * FROM processlist;
UPDATE test.v_processlist SET TIME=NOW() WHERE id = 1;
ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema'
CREATE VIEW test.v_processlist (ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS) AS SELECT * FROM processlist;
DROP VIEW test.v_processlist;
UPDATE processlist SET user='any_user' WHERE id=1 ;
ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema'
@ -167,11 +171,11 @@ SHOW GRANTS;
Grants for ddicttestuser1@localhost
GRANT PROCESS ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1'
SHOW processlist;
Id User Host db Command Time State Info
ID ddicttestuser1 HOST_NAME information_schema Query TIME NULL SHOW processlist
Id User Host db Command Time State Info Progress
ID ddicttestuser1 HOST_NAME information_schema Query TIME NULL SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO
ID ddicttestuser1 HOST_NAME information_schema Execute TIME executing SELECT * FROM information_schema.processlist
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS
ID ddicttestuser1 HOST_NAME information_schema Execute TIME executing SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000
####################################################################################
4.2 New connection con101 (ddicttestuser1 with PROCESS privilege)
SHOW/SELECT shows all processes/threads.
@ -180,15 +184,15 @@ SHOW GRANTS;
Grants for ddicttestuser1@localhost
GRANT PROCESS ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1'
SHOW processlist;
Id User Host db Command Time State Info
ID root HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Query TIME NULL SHOW processlist
Id User Host db Command Time State Info Progress
ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Query TIME NULL SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO
ID ddicttestuser1 HOST_NAME information_schema Execute TIME executing SELECT * FROM information_schema.processlist
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID root HOST_NAME information_schema Sleep TIME NULL
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS
ID ddicttestuser1 HOST_NAME information_schema Execute TIME executing SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
####################################################################################
5 Grant PROCESS privilege to anonymous user.
connection default (user=root)
@ -203,17 +207,17 @@ SHOW GRANTS;
Grants for @localhost
GRANT PROCESS ON *.* TO ''@'localhost'
SHOW processlist;
Id User Host db Command Time State Info
ID root HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID HOST_NAME information_schema Query TIME NULL SHOW processlist
Id User Host db Command Time State Info Progress
ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID HOST_NAME information_schema Query TIME NULL SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO
ID HOST_NAME information_schema Execute TIME executing SELECT * FROM information_schema.processlist
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID root HOST_NAME information_schema Sleep TIME NULL
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS
ID HOST_NAME information_schema Execute TIME executing SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
####################################################################################
6 Revoke PROCESS privilege from ddicttestuser1
connection default (user=root)
@ -228,15 +232,15 @@ SHOW GRANTS;
Grants for ddicttestuser1@localhost
GRANT USAGE ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1'
SHOW processlist;
Id User Host db Command Time State Info
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Query TIME NULL SHOW processlist
Id User Host db Command Time State Info Progress
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Query TIME NULL SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO
ID ddicttestuser1 HOST_NAME information_schema Execute TIME executing SELECT * FROM information_schema.processlist
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS
ID ddicttestuser1 HOST_NAME information_schema Execute TIME executing SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
####################################################################################
7 Revoke PROCESS privilege from anonymous user
connection default (user=root)
@ -251,9 +255,9 @@ SHOW GRANTS FOR ''@'localhost';
Grants for @localhost
GRANT USAGE ON *.* TO ''@'localhost'
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO
ID HOST_NAME information_schema Execute TIME executing SELECT * FROM information_schema.processlist
ID HOST_NAME information_schema Sleep TIME NULL
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS
ID HOST_NAME information_schema Execute TIME executing SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000
ID HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
####################################################################################
8 Grant SUPER (does not imply PROCESS) privilege to ddicttestuser1
connection default (user=root)
@ -267,17 +271,17 @@ SHOW GRANTS FOR 'ddicttestuser1'@'localhost';
Grants for ddicttestuser1@localhost
GRANT SUPER ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1'
SHOW processlist;
Id User Host db Command Time State Info
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Query TIME NULL SHOW processlist
Id User Host db Command Time State Info Progress
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Query TIME NULL SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO
ID ddicttestuser1 HOST_NAME information_schema Execute TIME executing SELECT * FROM information_schema.processlist
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS
ID ddicttestuser1 HOST_NAME information_schema Execute TIME executing SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
####################################################################################
9 Revoke SUPER privilege from user ddicttestuser1
connection default (user=root)
@ -292,19 +296,19 @@ SHOW GRANTS FOR 'ddicttestuser1'@'localhost';
Grants for ddicttestuser1@localhost
GRANT USAGE ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1'
SHOW processlist;
Id User Host db Command Time State Info
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Query TIME NULL SHOW processlist
Id User Host db Command Time State Info Progress
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Query TIME NULL SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO
ID ddicttestuser1 HOST_NAME information_schema Execute TIME executing SELECT * FROM information_schema.processlist
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS
ID ddicttestuser1 HOST_NAME information_schema Execute TIME executing SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
####################################################################################
10 Grant SUPER privilege with grant option to user ddicttestuser1.
connection default (user=root)
@ -340,31 +344,31 @@ SHOW GRANTS FOR 'ddicttestuser2'@'localhost';
Grants for ddicttestuser2@localhost
GRANT PROCESS ON *.* TO 'ddicttestuser2'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1'
SHOW processlist;
Id User Host db Command Time State Info
ID root HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser2 HOST_NAME information_schema Query TIME NULL SHOW processlist
Id User Host db Command Time State Info Progress
ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser2 HOST_NAME information_schema Query TIME NULL SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO
ID ddicttestuser2 HOST_NAME information_schema Execute TIME executing SELECT * FROM information_schema.processlist
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID root HOST_NAME information_schema Sleep TIME NULL
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS
ID ddicttestuser2 HOST_NAME information_schema Execute TIME executing SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
####################################################################################
11 User ddicttestuser1 revokes PROCESS privilege from user ddicttestuser2
connection ddicttestuser1;
@ -378,13 +382,13 @@ SHOW GRANTS;
Grants for ddicttestuser2@localhost
GRANT USAGE ON *.* TO 'ddicttestuser2'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1'
SHOW processlist;
Id User Host db Command Time State Info
ID ddicttestuser2 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser2 HOST_NAME information_schema Query TIME NULL SHOW processlist
Id User Host db Command Time State Info Progress
ID ddicttestuser2 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser2 HOST_NAME information_schema Query TIME NULL SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO
ID ddicttestuser2 HOST_NAME information_schema Execute TIME executing SELECT * FROM information_schema.processlist
ID ddicttestuser2 HOST_NAME information_schema Sleep TIME NULL
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS
ID ddicttestuser2 HOST_NAME information_schema Execute TIME executing SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000
ID ddicttestuser2 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
####################################################################################
11.2 Revoke SUPER,PROCESS,GRANT OPTION privilege from user ddicttestuser1
connection default (user=root)
@ -401,25 +405,25 @@ GRANT USAGE ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD '*22DA
GRANT PROCESS ON *.* TO 'ddicttestuser2'@'localhost';
ERROR 28000: Access denied for user 'ddicttestuser1'@'localhost' (using password: YES)
SHOW processlist;
Id User Host db Command Time State Info
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Query TIME NULL SHOW processlist
Id User Host db Command Time State Info Progress
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Query TIME NULL SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO
ID ddicttestuser1 HOST_NAME information_schema Execute TIME executing SELECT * FROM information_schema.processlist
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS
ID ddicttestuser1 HOST_NAME information_schema Execute TIME executing SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
####################################################################################
12 Revoke the SELECT privilege from user ddicttestuser1
connection default (user=root)
@ -436,27 +440,27 @@ SHOW GRANTS FOR 'ddicttestuser1'@'localhost';
Grants for ddicttestuser1@localhost
GRANT USAGE ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1'
SHOW processlist;
Id User Host db Command Time State Info
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Query TIME NULL SHOW processlist
Id User Host db Command Time State Info Progress
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
ID ddicttestuser1 HOST_NAME information_schema Query TIME NULL SHOW processlist TIME_MS
SELECT * FROM information_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO
ID ddicttestuser1 HOST_NAME information_schema Execute TIME executing SELECT * FROM information_schema.processlist
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS
ID ddicttestuser1 HOST_NAME information_schema Execute TIME executing SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000
####################################################################################
12.2 Revoke only the SELECT privilege on the information_schema from ddicttestuser1.
connection default (user=root)

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1219,7 +1219,7 @@ count(*)
623
explain select * from t1 where c between 1 and 2500;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range c c 5 NULL # Using index condition; Rowid-ordered scan
1 SIMPLE t1 range c c 5 NULL # Using where
update t1 set c=a;
explain select * from t1 where c between 1 and 2500;
id select_type table type possible_keys key key_len ref rows Extra
@ -1914,7 +1914,7 @@ qq
*a *a*a *
explain select * from t1 where v='a';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref v,v_2 # 13 const # Using index condition
1 SIMPLE t1 ref v,v_2 # 13 const # Using where
select v,count(*) from t1 group by v limit 10;
v count(*)
a 1
@ -2090,7 +2090,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref v v 303 const # Using where; Using index
explain select * from t1 where v='a';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref v v 303 const # Using index condition
1 SIMPLE t1 ref v v 303 const # Using where
select v,count(*) from t1 group by v limit 10;
v count(*)
a 1

View file

@ -104,7 +104,7 @@ id 1
select_type PRIMARY
table <derived2>
type ALL
possible_keys key0
possible_keys NULL
key NULL
key_len NULL
ref NULL
@ -308,7 +308,7 @@ id 1
select_type PRIMARY
table <derived2>
type ALL
possible_keys key0
possible_keys NULL
key NULL
key_len NULL
ref NULL

View file

@ -2624,46 +2624,6 @@ create table t1 (a int primary key, b int) engine = innodb;
insert into t1 values (1,1),(2,1);
alter ignore table t1 add unique `main` (b);
drop table t1;
#
# Bug#56862 Execution of a query that uses index merge returns a wrong result
#
CREATE TABLE t1 (
pk int NOT NULL AUTO_INCREMENT PRIMARY KEY,
a int,
b int,
INDEX idx(a))
ENGINE=INNODB;
INSERT INTO t1(a,b) VALUES
(11, 1100), (2, 200), (1, 100), (14, 1400), (5, 500),
(3, 300), (17, 1700), (4, 400), (12, 1200), (8, 800),
(6, 600), (18, 1800), (9, 900), (10, 1000), (7, 700),
(13, 1300), (15, 1500), (19, 1900), (16, 1600), (20, 2000);
INSERT INTO t1(a,b) SELECT a+20, b+2000 FROM t1;
INSERT INTO t1(a,b) SELECT a+40, b+4000 FROM t1;
INSERT INTO t1(a,b) SELECT a+80, b+8000 FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1 VALUES (1000000, 0, 0);
SET SESSION sort_buffer_size = 1024*36;
EXPLAIN
SELECT COUNT(*) FROM
(SELECT * FROM t1 FORCE INDEX (idx,PRIMARY)
WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge PRIMARY,idx idx,PRIMARY 5,4 NULL 3537 Using sort_union(idx,PRIMARY); Using where
SELECT COUNT(*) FROM
(SELECT * FROM t1 FORCE INDEX (idx,PRIMARY)
WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t;
COUNT(*)
1537
SET SESSION sort_buffer_size = DEFAULT;
DROP TABLE t1;
End of 5.1 tests
#
# Test for bug #39932 "create table fails if column for FK is in different

View file

@ -849,50 +849,6 @@ insert into t1 values (1,1),(2,1);
alter ignore table t1 add unique `main` (b);
drop table t1;
--echo #
--echo # Bug#56862 Execution of a query that uses index merge returns a wrong result
--echo #
CREATE TABLE t1 (
pk int NOT NULL AUTO_INCREMENT PRIMARY KEY,
a int,
b int,
INDEX idx(a))
ENGINE=INNODB;
INSERT INTO t1(a,b) VALUES
(11, 1100), (2, 200), (1, 100), (14, 1400), (5, 500),
(3, 300), (17, 1700), (4, 400), (12, 1200), (8, 800),
(6, 600), (18, 1800), (9, 900), (10, 1000), (7, 700),
(13, 1300), (15, 1500), (19, 1900), (16, 1600), (20, 2000);
INSERT INTO t1(a,b) SELECT a+20, b+2000 FROM t1;
INSERT INTO t1(a,b) SELECT a+40, b+4000 FROM t1;
INSERT INTO t1(a,b) SELECT a+80, b+8000 FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1 VALUES (1000000, 0, 0);
SET SESSION sort_buffer_size = 1024*36;
EXPLAIN
SELECT COUNT(*) FROM
(SELECT * FROM t1 FORCE INDEX (idx,PRIMARY)
WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t;
SELECT COUNT(*) FROM
(SELECT * FROM t1 FORCE INDEX (idx,PRIMARY)
WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t;
SET SESSION sort_buffer_size = DEFAULT;
DROP TABLE t1;
--echo End of 5.1 tests
--echo #

View file

@ -104,7 +104,7 @@ id 1
select_type PRIMARY
table <derived2>
type ALL
possible_keys key0
possible_keys NULL
key NULL
key_len NULL
ref NULL
@ -308,7 +308,7 @@ id 1
select_type PRIMARY
table <derived2>
type ALL
possible_keys key0
possible_keys NULL
key NULL
key_len NULL
ref NULL

View file

@ -2411,41 +2411,4 @@ PACK_KEYS=0;
CREATE INDEX a ON t1 (a);
CREATE INDEX c on t1 (c);
DROP TABLE t1;
CREATE TABLE t1 (
pk int NOT NULL AUTO_INCREMENT PRIMARY KEY,
a int,
b int,
INDEX idx(a))
ENGINE=INNODB;
INSERT INTO t1(a,b) VALUES
(11, 1100), (2, 200), (1, 100), (14, 1400), (5, 500),
(3, 300), (17, 1700), (4, 400), (12, 1200), (8, 800),
(6, 600), (18, 1800), (9, 900), (10, 1000), (7, 700),
(13, 1300), (15, 1500), (19, 1900), (16, 1600), (20, 2000);
INSERT INTO t1(a,b) SELECT a+20, b+2000 FROM t1;
INSERT INTO t1(a,b) SELECT a+40, b+4000 FROM t1;
INSERT INTO t1(a,b) SELECT a+80, b+8000 FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1 VALUES (1000000, 0, 0);
SET SESSION sort_buffer_size = 1024*36;
EXPLAIN
SELECT COUNT(*) FROM
(SELECT * FROM t1 FORCE INDEX (idx,PRIMARY)
WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge PRIMARY,idx idx,PRIMARY 5,4 NULL 3537 Using sort_union(idx,PRIMARY); Using where
SELECT COUNT(*) FROM
(SELECT * FROM t1 FORCE INDEX (idx,PRIMARY)
WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t;
COUNT(*)
1537
SET SESSION sort_buffer_size = DEFAULT;
DROP TABLE t1;
End of 5.1 tests

View file

@ -1,5 +1,7 @@
--source include/have_innodb_plugin.inc
--source include/long_test.inc
set session transaction isolation level read committed;
create table innodb_bug52663 (what varchar(5), id integer, count integer, primary key

View file

@ -647,48 +647,4 @@ CREATE INDEX c on t1 (c);
DROP TABLE t1;
#
# Bug#56862 Execution of a query that uses index merge returns a wrong result
#
CREATE TABLE t1 (
pk int NOT NULL AUTO_INCREMENT PRIMARY KEY,
a int,
b int,
INDEX idx(a))
ENGINE=INNODB;
INSERT INTO t1(a,b) VALUES
(11, 1100), (2, 200), (1, 100), (14, 1400), (5, 500),
(3, 300), (17, 1700), (4, 400), (12, 1200), (8, 800),
(6, 600), (18, 1800), (9, 900), (10, 1000), (7, 700),
(13, 1300), (15, 1500), (19, 1900), (16, 1600), (20, 2000);
INSERT INTO t1(a,b) SELECT a+20, b+2000 FROM t1;
INSERT INTO t1(a,b) SELECT a+40, b+4000 FROM t1;
INSERT INTO t1(a,b) SELECT a+80, b+8000 FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1 VALUES (1000000, 0, 0);
SET SESSION sort_buffer_size = 1024*36;
EXPLAIN
SELECT COUNT(*) FROM
(SELECT * FROM t1 FORCE INDEX (idx,PRIMARY)
WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t;
SELECT COUNT(*) FROM
(SELECT * FROM t1 FORCE INDEX (idx,PRIMARY)
WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t;
SET SESSION sort_buffer_size = DEFAULT;
DROP TABLE t1;
--echo End of 5.1 tests

View file

@ -0,0 +1,31 @@
drop table if exists t1;
CREATE TABLE t1 (
`Vorgangsnr` int(10) unsigned NOT NULL AUTO_INCREMENT,
`Datum_Eingang` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Erfassungs-/Buchungsdatum',
`Warennummer` varchar(20) DEFAULT NULL,
`BenutzerID` int(10) unsigned DEFAULT NULL,
`Vermerke_Versand` varchar(1024) DEFAULT NULL,
`Zubehör` varchar(250) DEFAULT NULL,
`Datum_Annahme` varchar(12) DEFAULT NULL,
`K_Lieferscheinnummer` int(10) unsigned DEFAULT NULL,
`RMANr` int(10) unsigned DEFAULT '0',
`K_Bestelldaten` varchar(1024) DEFAULT NULL COMMENT 'Bestellnr, Datum, Auftraggeber',
PRIMARY KEY (`Vorgangsnr`),
KEY `Datum_Eingang` (`Datum_Eingang`)
) ENGINE=Aria AUTO_INCREMENT=250 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC;
alter table t1 disable keys;
lock tables t1 write;
INSERT INTO t1 (Datum_Eingang, BenutzerID, Zubehör, Datum_Annahme) VALUES ('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006');
INSERT INTO t1 (Datum_Eingang, BenutzerID, Zubehör, Datum_Annahme) VALUES ('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006');
unlock tables;
select count(*) from t1;
count(*)
88
check table t1 extended;
Table Op Msg_type Msg_text
test.t1 check status OK
alter table t1 enable keys;
check table t1 extended;
Table Op Msg_type Msg_text
test.t1 check status OK
drop table t1;

View file

@ -78,7 +78,7 @@ ERROR HY000: Lost connection to MySQL server during query
* recovery happens
check table t1 extended;
Table Op Msg_type Msg_text
mysqltest.t1 check warning Size of indexfile is: 372 Should be: 8192
mysqltest.t1 check warning Size of indexfile is: 372 Expected: 8192
mysqltest.t1 check status OK
* testing that checksum after recovery is as expected
Checksum-check

View file

@ -22,6 +22,17 @@ CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check status OK
drop table t1;
create table t1 (a int primary key auto_increment) engine=aria;
insert into t1 values (1);
update t1 set a=0 where a=1;
check table t1;
Table Op Msg_type Msg_text
test.t1 check warning Found row where the auto_increment column has the value 0
test.t1 check status OK
select * from t1;
a
0
drop table t1;
create table t1 (a tinyint not null auto_increment, b blob not null, primary key (a));
check table t1;
Table Op Msg_type Msg_text
@ -350,7 +361,8 @@ ALTER TABLE t1 ADD INDEX t1 (a, b, c, d, e);
ERROR 42000: Specified key was too long; max key length is 1208 bytes
DROP TABLE t1;
CREATE TABLE t1 (a int not null, b int, c int, key(b), key(c), key(a,b), key(c,a));
INSERT into t1 values (0, null, 0), (0, null, 1), (0, null, 2), (0, null,3), (1,1,4);
INSERT into t1 values (0,null,0), (0,null,1), (0,null,2), (0,null,3), (1,1,4);
INSERT into t1 values (2,4,5), (7,8,4), (8,3,1), (9,7,2), (5,5,9);
create table t2 (a int not null, b int, c int, key(b), key(c), key(a));
INSERT into t2 values (1,1,1), (2,2,2);
optimize table t1;
@ -361,24 +373,24 @@ Table Op Msg_type Msg_text
test.t1 check status OK
show index from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
t1 1 b 1 b A 5 NULL NULL YES BTREE
t1 1 c 1 c A 5 NULL NULL YES BTREE
t1 1 a 1 a A 1 NULL NULL BTREE
t1 1 a 2 b A 5 NULL NULL YES BTREE
t1 1 c_2 1 c A 5 NULL NULL YES BTREE
t1 1 c_2 2 a A 5 NULL NULL BTREE
t1 1 b 1 b A 10 NULL NULL YES BTREE
t1 1 c 1 c A 10 NULL NULL YES BTREE
t1 1 a 1 a A 10 NULL NULL BTREE
t1 1 a 2 b A 10 NULL NULL YES BTREE
t1 1 c_2 1 c A 10 NULL NULL YES BTREE
t1 1 c_2 2 a A 10 NULL NULL BTREE
explain select * from t1,t2 where t1.a=t2.a;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL a NULL NULL NULL 2
1 SIMPLE t1 ref a a 4 test.t2.a 3
1 SIMPLE t1 ref a a 4 test.t2.a 1
explain select * from t1,t2 force index(a) where t1.a=t2.a;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL a NULL NULL NULL 2
1 SIMPLE t1 ref a a 4 test.t2.a 3
1 SIMPLE t1 ref a a 4 test.t2.a 1
explain select * from t1 force index(a),t2 force index(a) where t1.a=t2.a;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL a NULL NULL NULL 2
1 SIMPLE t1 ref a a 4 test.t2.a 3
1 SIMPLE t1 ref a a 4 test.t2.a 1
explain select * from t1,t2 where t1.b=t2.b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL b NULL NULL NULL 2 Using where
@ -386,19 +398,19 @@ id select_type table type possible_keys key key_len ref rows Extra
explain select * from t1,t2 force index(c) where t1.a=t2.a;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 2
1 SIMPLE t1 ref a a 4 test.t2.a 3
1 SIMPLE t1 ref a a 4 test.t2.a 1
explain select * from t1 where a=0 or a=2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range a a 4 NULL 4 Using index condition; Rowid-ordered scan
1 SIMPLE t1 range a a 4 NULL 5 Using where
explain select * from t1 force index (a) where a=0 or a=2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range a a 4 NULL 4 Using index condition; Rowid-ordered scan
1 SIMPLE t1 range a a 4 NULL 5 Using where
explain select * from t1 where c=1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref c,c_2 c 5 const 1
1 SIMPLE t1 ref c,c_2 c 5 const 2
explain select * from t1 use index() where c=1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where
1 SIMPLE t1 ALL NULL NULL NULL NULL 10 Using where
drop table t1,t2;
create table t1 (a int not null auto_increment primary key, b varchar(255));
insert into t1 (b) values (repeat('a',100)),(repeat('b',100)),(repeat('c',100));
@ -1131,7 +1143,7 @@ qq
*a *a*a *
explain select * from t1 where v='a';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref v,v_2 # 13 const # Using index condition
1 SIMPLE t1 ref v,v_2 # 13 const # Using where
select v,count(*) from t1 group by v limit 10;
v count(*)
a 1
@ -1307,7 +1319,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref v v 303 const # Using where; Using index
explain select * from t1 where v='a';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref v v 303 const # Using index condition
1 SIMPLE t1 ref v v 303 const # Using where
select v,count(*) from t1 group by v limit 10;
v count(*)
a 1
@ -2131,7 +2143,7 @@ c3 VARCHAR(10) NOT NULL,
KEY (c1),
KEY (c2)
) ENGINE=aria DEFAULT CHARSET=utf8 PACK_KEYS=0;
Aria file: MYSQLD_DATADIR/test/t1
Aria file: MYSQLD_DATADIR/test/t1
Record format: Block
Crashsafe: yes
Character set: utf8_general_ci (33)

View file

@ -305,6 +305,7 @@ select lower(variable_name) as Variable_name, Variable_value as Value from infor
Variable_name Value
aria_block_size 8192
aria_checkpoint_interval 30
aria_checkpoint_log_activity 1048576
aria_force_start_after_recovery_failures 0
aria_group_commit none
aria_group_commit_interval 0

View file

@ -0,0 +1,56 @@
drop table if exists t1,t2;
Warnings:
Note 1051 Unknown table 't1'
Note 1051 Unknown table 't2'
create table t1 (id int(10) unsigned not null auto_increment primary key, v varchar(1000), b blob) row_format=page max_rows=2 engine=aria;
create table t2 (id int(10) unsigned not null auto_increment primary key, v varchar(1000), b blob) row_format=page max_rows=20000000 engine=aria;
lock tables t1 write,t2 write;
show table status like "t_";
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
t1 Aria 10 Page 0 0 8192 268320768 8192 0 1 # # # latin1_swedish_ci NULL max_rows=2 row_format=PAGE
t2 Aria 10 Page 0 0 8192 17592186011648 8192 0 1 # # # latin1_swedish_ci NULL max_rows=20000000 row_format=PAGE
insert into t1 values(null, repeat("ab",100),repeat("def",1000));
insert into t1 values(null, repeat("de",200),repeat("ghi",2000));
insert into t1 values(null, repeat("fe",300),repeat("ghi",3000));
insert into t1 values(null, repeat("gh",400),repeat("jkl",10000));
insert into t1 (v,b) select v,b from t2;
insert into t2 (v,b) select v,b from t1;
insert into t1 (v,b) select v,b from t2;
insert into t2 (v,b) select v,b from t1;
insert into t1 (v,b) select v,b from t2;
insert into t2 (v,b) select v,b from t1;
insert into t1 (v,b) select v,b from t2;
insert into t2 (v,b) select v,b from t1;
insert into t1 (v,b) select v,b from t2;
insert into t2 (v,b) select v,b from t1;
insert into t1 (v,b) select v,b from t2;
insert into t2 (v,b) select v,b from t1;
insert into t1 (v,b) select v,b from t2;
insert into t2 (v,b) select v,b from t1;
insert into t1 (v,b) select v,b from t2;
insert into t2 (v,b) select v,b from t1;
insert into t1 (v,b) select v,b from t2;
insert into t2 (v,b) select v,b from t1;
insert into t1 (v,b) select v,b from t2;
insert into t2 (v,b) select v,b from t1;
unlock tables;
insert into t1 (v,b) select v,b from t2;
ERROR HY000: The table 't1' is full
check table t1;
Table Op Msg_type Msg_text
test.t1 check warning Datafile is almost full, 268230656 of 268320768 used
test.t1 check status OK
insert into t1 values(null, repeat("gh",400),repeat("jkl",10000));
ERROR HY000: The table 't1' is full
check table t1;
Table Op Msg_type Msg_text
test.t1 check warning Datafile is almost full, 268230656 of 268320768 used
test.t1 check status OK
truncate table t1;
insert into t1 (v,b) select v,b from t2;
ERROR HY000: The table 't1' is full
check table t1;
Table Op Msg_type Msg_text
test.t1 check warning Datafile is almost full, 268230656 of 268320768 used
test.t1 check status OK
drop table t1,t2;

View file

@ -0,0 +1,33 @@
DROP TABLE if exists t1;
Warnings:
Note 1051 Unknown table 't1'
CREATE TABLE t1 (col_longtext_ucs2 longtext, col_longtext_utf8 longtext, col_varchar_255_ucs2_key varchar(255), col_set_utf8 set ('a','b'), col_char_255_ucs2 char(255), col_char_255_ucs2_key char(255), col_enum_ucs2 enum ('a','b'), col_varchar_255_ucs2 varchar(255), col_longtext_ucs2_key longtext, col_longtext_utf8_key longtext, col_enum_utf8 enum ('a','b'), col_varchar_255_utf8_key varchar(1024), col_varchar_255_utf8 varchar(255), col_enum_ucs2_key enum ('a','b'), col_enum_utf8_key enum ('a','b'), col_set_utf8_key set ('a','b'), col_char_255_utf8 char(255), pk integer auto_increment, col_set_ucs2_key set ('a','b'), col_char_255_utf8_key char(255), col_set_ucs2 set ('a','b'), primary key (pk)) ENGINE=aria;
INSERT INTO t1 ( col_char_255_utf8, col_varchar_255_utf8_key, col_longtext_utf8_key ) VALUES ( 'lggnqojgqectqlkvskffihliqcwoakzzzjvhkqlwjybkngdbubskflpmzegdrk', REPEAT( 'a', 627 ), 'mlggnqojgqectqlkvskffihliqcwoakzzzjvhkqlwjybkngdbubskflpmzegdrklnipcmzbtwdqfnyinqfohgtiwmvfpbuslgobjhslxnaybcyebhsrlipnuvalhmvhlwbwujtvjsdrbyapfzprnxfgtrukwhywtkaoupsaogxsjxhqjkidvnpeytjgndtnrrbm' );
UPDATE t1 SET col_varchar_255_utf8 = REPEAT('a', 197 );
UPDATE t1 SET col_char_255_utf8 = 'bmjihzjtxegprqfvmczyzbavjuozkyxrlxvqyzcfvsjrhcccqnecyohzhzbgsbqkqvzmtlhtlcgzheirkyfwczoolilkrfimfnuoapyylbghdhdgfebjjajfoigagozypqtrflrvdiwfgqalsqbmlllsanvtuuutiaastqtbzeoaawl';
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
drop table t1;
create table t1 (a int primary key auto_increment, e1 enum('a','b'), e2 enum('a','b'), vl int, bl int, c char(10), v1 varchar(10000), v2 varchar(10000), b1 blob, b2 blob) engine=aria;
insert into t1 (vl,bl) values (10,10),(100,100),(1000,1000),(5000,5000),(8000,12000);
update t1 set c="test", v1=repeat('a',vl),v2=repeat('b',vl/2),b1=repeat('c',bl),b2=repeat('d',bl);
insert into t1 (vl,bl) values (10,10),(100,100),(1000,1000),(1000,5000);
update t1 set c="test", v1=repeat('a',vl/4),v2=repeat('b',vl/5),b1=repeat('c',bl*2),b2=repeat('d',bl/2);
insert into t1 (vl,bl) values (100,100);
update t1 set c="test", v1=repeat('a',vl),v2=repeat('b',vl),b1=repeat('c',bl*2),b2=repeat('d',bl/2);
update t1 set c="test", v1=repeat('a',vl/2),v2=repeat('b',vl/2),b1=repeat('c',bl/2),b2=repeat('d',bl/2);
update t1 set c="test", v1=repeat('a',vl/4),v2=repeat('b',vl/4),b1=repeat('c',bl/4),b2=repeat('d',bl/4);
update t1 set c="test", v1=repeat('a',vl/20),v2=repeat('b',vl),b1=repeat('c',bl/20),b2=repeat('d',bl/20);
insert into t1 (vl,bl) values (100,100);
update t1 set c="test", v1=repeat('a',vl/100),b1=repeat('c',bl/100);
insert into t1 (vl,bl) values (100,100);
update t1 set c="test", v1=repeat('a',vl),b1=repeat('c',bl);
insert into t1 (vl,bl) values (100,100);
update t1 set c="test", v1=repeat('a',10),v2=repeat('b',10);
insert into t1 (vl,bl) values (100,100);
update t1 set c="test", v1=repeat('a',2000),v2=repeat('b',2000);
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
drop table t1;

View file

@ -0,0 +1,43 @@
#
# Aria bugs that has to do with locking
#
--source include/have_maria.inc
disable_warnings;
drop table if exists t1;
enable_warnings;
#
# Test generating data with insert select
#
CREATE TABLE t1 (
`Vorgangsnr` int(10) unsigned NOT NULL AUTO_INCREMENT,
`Datum_Eingang` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Erfassungs-/Buchungsdatum',
`Warennummer` varchar(20) DEFAULT NULL,
`BenutzerID` int(10) unsigned DEFAULT NULL,
`Vermerke_Versand` varchar(1024) DEFAULT NULL,
`Zubehör` varchar(250) DEFAULT NULL,
`Datum_Annahme` varchar(12) DEFAULT NULL,
`K_Lieferscheinnummer` int(10) unsigned DEFAULT NULL,
`RMANr` int(10) unsigned DEFAULT '0',
`K_Bestelldaten` varchar(1024) DEFAULT NULL COMMENT 'Bestellnr, Datum, Auftraggeber',
PRIMARY KEY (`Vorgangsnr`),
KEY `Datum_Eingang` (`Datum_Eingang`)
) ENGINE=Aria AUTO_INCREMENT=250 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC;
alter table t1 disable keys;
lock tables t1 write;
let $loop=2;
while ($loop)
{
INSERT INTO t1 (Datum_Eingang, BenutzerID, Zubehör, Datum_Annahme) VALUES ('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006'),('2006-06-21 00:00:00', 713, 'ohne Zubehör', '21.06.2006');
dec $loop;
}
unlock tables;
select count(*) from t1;
check table t1 extended;
alter table t1 enable keys;
check table t1 extended;
drop table t1;

View file

@ -41,6 +41,16 @@ INSERT INTO t1 VALUES ('WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
CHECK TABLE t1;
drop table t1;
#
# Test auto_increment warning
#
create table t1 (a int primary key auto_increment) engine=aria;
insert into t1 values (1);
update t1 set a=0 where a=1;
check table t1;
select * from t1;
drop table t1;
#
# Test problem with rows that are 65517-65520 bytes long
#
@ -376,7 +386,8 @@ DROP TABLE t1;
#
CREATE TABLE t1 (a int not null, b int, c int, key(b), key(c), key(a,b), key(c,a));
INSERT into t1 values (0, null, 0), (0, null, 1), (0, null, 2), (0, null,3), (1,1,4);
INSERT into t1 values (0,null,0), (0,null,1), (0,null,2), (0,null,3), (1,1,4);
INSERT into t1 values (2,4,5), (7,8,4), (8,3,1), (9,7,2), (5,5,9);
create table t2 (a int not null, b int, c int, key(b), key(c), key(a));
INSERT into t2 values (1,1,1), (2,2,2);
optimize table t1;

View file

@ -0,0 +1,52 @@
# Test max data length
# This test will use around 1.3G of disk space!
--source include/have_maria.inc
--source include/big_test.inc
drop table if exists t1,t2;
create table t1 (id int(10) unsigned not null auto_increment primary key, v varchar(1000), b blob) row_format=page max_rows=2 engine=aria;
create table t2 (id int(10) unsigned not null auto_increment primary key, v varchar(1000), b blob) row_format=page max_rows=20000000 engine=aria;
lock tables t1 write,t2 write;
--replace_column 12 # 13 # 14 #
show table status like "t_";
insert into t1 values(null, repeat("ab",100),repeat("def",1000));
insert into t1 values(null, repeat("de",200),repeat("ghi",2000));
insert into t1 values(null, repeat("fe",300),repeat("ghi",3000));
insert into t1 values(null, repeat("gh",400),repeat("jkl",10000));
insert into t1 (v,b) select v,b from t2;
insert into t2 (v,b) select v,b from t1;
insert into t1 (v,b) select v,b from t2;
insert into t2 (v,b) select v,b from t1;
insert into t1 (v,b) select v,b from t2;
insert into t2 (v,b) select v,b from t1;
insert into t1 (v,b) select v,b from t2;
insert into t2 (v,b) select v,b from t1;
insert into t1 (v,b) select v,b from t2;
insert into t2 (v,b) select v,b from t1;
insert into t1 (v,b) select v,b from t2;
insert into t2 (v,b) select v,b from t1;
insert into t1 (v,b) select v,b from t2;
insert into t2 (v,b) select v,b from t1;
insert into t1 (v,b) select v,b from t2;
insert into t2 (v,b) select v,b from t1;
insert into t1 (v,b) select v,b from t2;
insert into t2 (v,b) select v,b from t1;
insert into t1 (v,b) select v,b from t2;
insert into t2 (v,b) select v,b from t1;
unlock tables;
--error ER_RECORD_FILE_FULL
insert into t1 (v,b) select v,b from t2;
check table t1;
--error ER_RECORD_FILE_FULL
insert into t1 values(null, repeat("gh",400),repeat("jkl",10000));
check table t1;
# Test also with inserting into empty table (different code)
truncate table t1;
--error ER_RECORD_FILE_FULL
insert into t1 (v,b) select v,b from t2;
check table t1;
drop table t1,t2;

View file

@ -0,0 +1 @@
--aria-block-size=1024

View file

@ -0,0 +1,34 @@
DROP TABLE if exists t1;
#
# Test of extending updated rows.
# This caused failures in lp:815022
#
CREATE TABLE t1 (col_longtext_ucs2 longtext, col_longtext_utf8 longtext, col_varchar_255_ucs2_key varchar(255), col_set_utf8 set ('a','b'), col_char_255_ucs2 char(255), col_char_255_ucs2_key char(255), col_enum_ucs2 enum ('a','b'), col_varchar_255_ucs2 varchar(255), col_longtext_ucs2_key longtext, col_longtext_utf8_key longtext, col_enum_utf8 enum ('a','b'), col_varchar_255_utf8_key varchar(1024), col_varchar_255_utf8 varchar(255), col_enum_ucs2_key enum ('a','b'), col_enum_utf8_key enum ('a','b'), col_set_utf8_key set ('a','b'), col_char_255_utf8 char(255), pk integer auto_increment, col_set_ucs2_key set ('a','b'), col_char_255_utf8_key char(255), col_set_ucs2 set ('a','b'), primary key (pk)) ENGINE=aria;
INSERT INTO t1 ( col_char_255_utf8, col_varchar_255_utf8_key, col_longtext_utf8_key ) VALUES ( 'lggnqojgqectqlkvskffihliqcwoakzzzjvhkqlwjybkngdbubskflpmzegdrk', REPEAT( 'a', 627 ), 'mlggnqojgqectqlkvskffihliqcwoakzzzjvhkqlwjybkngdbubskflpmzegdrklnipcmzbtwdqfnyinqfohgtiwmvfpbuslgobjhslxnaybcyebhsrlipnuvalhmvhlwbwujtvjsdrbyapfzprnxfgtrukwhywtkaoupsaogxsjxhqjkidvnpeytjgndtnrrbm' );
UPDATE t1 SET col_varchar_255_utf8 = REPEAT('a', 197 );
UPDATE t1 SET col_char_255_utf8 = 'bmjihzjtxegprqfvmczyzbavjuozkyxrlxvqyzcfvsjrhcccqnecyohzhzbgsbqkqvzmtlhtlcgzheirkyfwczoolilkrfimfnuoapyylbghdhdgfebjjajfoigagozypqtrflrvdiwfgqalsqbmlllsanvtuuutiaastqtbzeoaawl';
check table t1;
drop table t1;
create table t1 (a int primary key auto_increment, e1 enum('a','b'), e2 enum('a','b'), vl int, bl int, c char(10), v1 varchar(10000), v2 varchar(10000), b1 blob, b2 blob) engine=aria;
insert into t1 (vl,bl) values (10,10),(100,100),(1000,1000),(5000,5000),(8000,12000);
update t1 set c="test", v1=repeat('a',vl),v2=repeat('b',vl/2),b1=repeat('c',bl),b2=repeat('d',bl);
insert into t1 (vl,bl) values (10,10),(100,100),(1000,1000),(1000,5000);
update t1 set c="test", v1=repeat('a',vl/4),v2=repeat('b',vl/5),b1=repeat('c',bl*2),b2=repeat('d',bl/2);
insert into t1 (vl,bl) values (100,100);
update t1 set c="test", v1=repeat('a',vl),v2=repeat('b',vl),b1=repeat('c',bl*2),b2=repeat('d',bl/2);
update t1 set c="test", v1=repeat('a',vl/2),v2=repeat('b',vl/2),b1=repeat('c',bl/2),b2=repeat('d',bl/2);
update t1 set c="test", v1=repeat('a',vl/4),v2=repeat('b',vl/4),b1=repeat('c',bl/4),b2=repeat('d',bl/4);
update t1 set c="test", v1=repeat('a',vl/20),v2=repeat('b',vl),b1=repeat('c',bl/20),b2=repeat('d',bl/20);
insert into t1 (vl,bl) values (100,100);
update t1 set c="test", v1=repeat('a',vl/100),b1=repeat('c',bl/100);
insert into t1 (vl,bl) values (100,100);
update t1 set c="test", v1=repeat('a',vl),b1=repeat('c',bl);
insert into t1 (vl,bl) values (100,100);
update t1 set c="test", v1=repeat('a',10),v2=repeat('b',10);
insert into t1 (vl,bl) values (100,100);
update t1 set c="test", v1=repeat('a',2000),v2=repeat('b',2000);
check table t1;
drop table t1;

View file

@ -264,6 +264,7 @@ Table Op Msg_type Msg_text
test.t1_will_crash analyze status OK
OPTIMIZE TABLE t1_will_crash;
Table Op Msg_type Msg_text
test.t1_will_crash optimize info Found row block followed by deleted block
test.t1_will_crash optimize warning Number of rows changed from 8 to 7
test.t1_will_crash optimize status OK
CHECK TABLE t1_will_crash;

View file

@ -57,8 +57,9 @@ a b a b
3 c 3 c
explain select * from t1 as x1, (select * from t1) as x2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE x1 ALL NULL NULL NULL NULL 4
1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using join buffer (flat, BNL join)
1 PRIMARY x1 ALL NULL NULL NULL NULL 4
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 4 Using join buffer (flat, BNL join)
2 DERIVED t1 ALL NULL NULL NULL NULL 4
drop table if exists t2,t3;
select * from (select 1) as a;
1
@ -112,8 +113,9 @@ a b
3 c
explain select * from (select t1.*, t2.a as t2a from t1,t2 where t1.a=t2.a) t1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 1
1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using where; Using join buffer (flat, BNL join)
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 4
2 DERIVED t2 ALL NULL NULL NULL NULL 1
2 DERIVED t1 ALL NULL NULL NULL NULL 4 Using where; Using join buffer (flat, BNL join)
drop table t1, t2;
create table t1(a int not null, t char(8), index(a));
SELECT * FROM (SELECT * FROM t1) as b ORDER BY a ASC LIMIT 0,20;
@ -140,8 +142,9 @@ a t
20 20
explain select count(*) from t1 as tt1, (select * from t1) as tt2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE tt1 index NULL a 4 NULL 10000 Using index
1 SIMPLE t1 ALL NULL NULL NULL NULL 10000 Using join buffer (flat, BNL join)
1 PRIMARY tt1 index NULL a 4 NULL 10000 Using index
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 10000 Using join buffer (flat, BNL join)
2 DERIVED t1 ALL NULL NULL NULL NULL 10000
drop table t1;
SELECT * FROM (SELECT (SELECT * FROM (SELECT 1 as a) as a )) as b;
(SELECT * FROM (SELECT 1 as a) as a )
@ -170,30 +173,30 @@ insert into t1 values (NULL, 'a', 1), (NULL, 'b', 2), (NULL, 'c', 3), (NULL, 'd'
insert into t2 values (1, 100), (1, 101), (1, 102), (2, 100), (2, 103), (2, 104), (3, 101), (3, 102), (3, 105);
SELECT STRAIGHT_JOIN d.pla_id, m2.mat_id FROM t1 m2 INNER JOIN (SELECT mp.pla_id, MIN(m1.matintnum) AS matintnum FROM t2 mp INNER JOIN t1 m1 ON mp.mat_id=m1.mat_id GROUP BY mp.pla_id) d ON d.matintnum=m2.matintnum;
pla_id mat_id
102 1
101 1
100 1
104 2
101 1
102 1
103 2
104 2
105 3
SELECT STRAIGHT_JOIN d.pla_id, m2.test FROM t1 m2 INNER JOIN (SELECT mp.pla_id, MIN(m1.matintnum) AS matintnum FROM t2 mp INNER JOIN t1 m1 ON mp.mat_id=m1.mat_id GROUP BY mp.pla_id) d ON d.matintnum=m2.matintnum;
pla_id test
102 1
101 1
100 1
104 2
101 1
102 1
103 2
104 2
105 3
explain SELECT STRAIGHT_JOIN d.pla_id, m2.mat_id FROM t1 m2 INNER JOIN (SELECT mp.pla_id, MIN(m1.matintnum) AS matintnum FROM t2 mp INNER JOIN t1 m1 ON mp.mat_id=m1.mat_id GROUP BY mp.pla_id) d ON d.matintnum=m2.matintnum;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY m2 ALL NULL NULL NULL NULL 9
1 PRIMARY <derived2> ref key0 key0 7 test.m2.matintnum 2
1 PRIMARY <derived2> ALL NULL $hj 7 test.m2.matintnum 9 Using where
2 DERIVED mp ALL NULL NULL NULL NULL 9 Using temporary; Using filesort
2 DERIVED m1 eq_ref PRIMARY PRIMARY 3 test.mp.mat_id 1
explain SELECT STRAIGHT_JOIN d.pla_id, m2.test FROM t1 m2 INNER JOIN (SELECT mp.pla_id, MIN(m1.matintnum) AS matintnum FROM t2 mp INNER JOIN t1 m1 ON mp.mat_id=m1.mat_id GROUP BY mp.pla_id) d ON d.matintnum=m2.matintnum;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY m2 ALL NULL NULL NULL NULL 9
1 PRIMARY <derived2> ref key0 key0 7 test.m2.matintnum 2
1 PRIMARY <derived2> ALL NULL $hj 7 test.m2.matintnum 9 Using where
2 DERIVED mp ALL NULL NULL NULL NULL 9 Using temporary; Using filesort
2 DERIVED m1 eq_ref PRIMARY PRIMARY 3 test.mp.mat_id 1
drop table t1,t2;
@ -231,8 +234,9 @@ count(*)
2
explain select count(*) from t1 INNER JOIN (SELECT A.E1, A.E2, A.E3 FROM t1 AS A WHERE A.E3 = (SELECT MAX(B.E3) FROM t1 AS B WHERE A.E2 = B.E2)) AS THEMAX ON t1.E1 = THEMAX.E2 AND t1.E1 = t1.E2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE A ALL NULL NULL NULL NULL 2 Using where
1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.A.E2 1 Using where
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2
1 PRIMARY t1 eq_ref PRIMARY PRIMARY 4 THEMAX.E2 1 Using where
2 DERIVED A ALL NULL NULL NULL NULL 2 Using where
3 DEPENDENT SUBQUERY B ALL NULL NULL NULL NULL 2 Using where
drop table t1;
create table t1 (a int);
@ -322,7 +326,8 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 index PRIMARY PRIMARY 4 NULL 2 Using where; Using index
explain select a from (select a from t2 where a>1) tt;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 index PRIMARY PRIMARY 4 NULL 2 Using where; Using index
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2
2 DERIVED t2 index PRIMARY PRIMARY 4 NULL 2 Using where; Using index
drop table t2;
CREATE TABLE `t1` ( `itemid` int(11) NOT NULL default '0', `grpid` varchar(15) NOT NULL default '', `vendor` int(11) NOT NULL default '0', `date_` date NOT NULL default '0000-00-00', `price` decimal(12,2) NOT NULL default '0.00', PRIMARY KEY (`itemid`,`grpid`,`vendor`,`date_`), KEY `itemid` (`itemid`,`vendor`), KEY `itemid_2` (`itemid`,`date_`));
insert into t1 values (128, 'rozn', 2, now(), 10),(128, 'rozn', 1, now(), 10);

View file

@ -601,7 +601,7 @@ AME AME
explain
select min(a1) from t1 where a1 > 'KKK' or a1 < 'XXX';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index PRIMARY PRIMARY 3 NULL 15 Using where; Using index
1 SIMPLE t1 range PRIMARY PRIMARY 0 NULL 1 Using where; Using index
explain
select min(a1) from t1 where a1 != 'KKK';
id select_type table type possible_keys key key_len ref rows Extra

View file

@ -419,9 +419,15 @@ id select_type table type possible_keys key key_len ref rows Extra
select f2 from t2 where f2 in ('a','b');
f2
0
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b'
explain select f2 from t2 where f2 in ('a','b');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 index t2f2 t2f2 5 NULL 3 Using where; Using index
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b'
select f2 from t2 where f2 in (1,'b');
f2
0

View file

@ -876,10 +876,10 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range NULL idx_t1_1 163 NULL 129 Using where; Using index for group-by
explain select a1,a2,b, max(c) from t1 where (c > 'b1') or (c <= 'g1') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range NULL idx_t1_1 163 NULL 129 Using where; Using index for group-by
1 SIMPLE t1 range NULL idx_t1_1 147 NULL 129 Using where; Using index for group-by
explain select a1,a2,b,min(c),max(c) from t1 where (c > 'b1') or (c <= 'g1') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range NULL idx_t1_1 163 NULL 129 Using where; Using index for group-by
1 SIMPLE t1 range NULL idx_t1_1 147 NULL 129 Using where; Using index for group-by
explain select a1,a2,b,min(c),max(c) from t1 where (c > 'b111') and (c <= 'g112') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range NULL idx_t1_1 163 NULL 129 Using where; Using index for group-by
@ -924,7 +924,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range NULL idx_t2_1 163 NULL # Using where; Using index for group-by
explain select a1,a2,b, max(c) from t2 where (c > 'b1') or (c <= 'g1') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range NULL idx_t2_1 163 NULL # Using where; Using index for group-by
1 SIMPLE t2 range NULL idx_t2_1 146 NULL # Using where; Using index for group-by
explain select a1,a2,b,min(c),max(c) from t2 where (c > 'b1') or (c <= 'g1') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range NULL idx_t2_1 163 NULL # Using where; Using index for group-by
@ -2267,7 +2267,7 @@ EXPLAIN SELECT 1 FROM t1 AS t1_outer1 JOIN t1 AS t1_outer2
ON t1_outer1.a = (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2)
AND t1_outer1.b = t1_outer2.b;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1_outer1 ref a a 5 const 1 Using index
1 PRIMARY t1_outer1 ref a a 5 const 1 Using where; Using index
1 PRIMARY t1_outer2 index NULL a 10 NULL 15 Using where; Using index; Using join buffer (flat, BNL join)
2 SUBQUERY t1 index NULL a 10 NULL 15 Using index
EXPLAIN SELECT (SELECT (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2) x

View file

@ -1017,6 +1017,7 @@ id select_type table type possible_keys key key_len ref rows Extra
ATTENTION: the above EXPLAIN has several competing QEPs with identical
. costs. To combat the plan change it uses --sorted_result and
. and --replace tricks
INSERT INTO t1 VALUES (-1,133,0), (-2,12,0), (-3,11,0), (-5,15,0);
CREATE INDEX idx_b ON t1(b);
CREATE INDEX idx_a ON t0(a);
EXPLAIN
@ -1041,7 +1042,7 @@ ON t6.b >= 2 AND t5.b=t7.b
)
ON (t3.b=2 OR t3.c IS NULL) AND (t6.b=2 OR t6.c IS NULL) AND
(t1.b=t5.b OR t3.c IS NULL OR t6.c IS NULL or t8.c IS NULL) AND
(t1.a != 2),
(t1.a != 2) AND t1.a>0,
t9
WHERE t0.a=1 AND
t0.b=t1.b AND
@ -1089,7 +1090,7 @@ ON t6.b >= 2 AND t5.b=t7.b
)
ON (t3.b=2 OR t3.c IS NULL) AND (t6.b=2 OR t6.c IS NULL) AND
(t1.b=t5.b OR t3.c IS NULL OR t6.c IS NULL or t8.c IS NULL) AND
(t1.a != 2),
(t1.a != 2) AND t1.a>0,
t9
WHERE t0.a=1 AND
t0.b=t1.b AND

View file

@ -6,7 +6,12 @@ KEY (a),
KEY (b)
);
INSERT INTO t1 VALUES ('A','B'),('b','A'),('C','c'),('D','E'),('a','a');
select * from t1,t1 as t2;
INSERT INTO t1 VALUES
('AA','BB'),('bb','AA'),('CC','cc'),('DD','EE'),('aa','aa');
INSERT INTO t1 VALUES
('AAA','BBB'),('bbb','AAA'),('CCC','ccc'),('DDD','EEE'),('aaa','aaa');
select * from t1,t1 as t2
where length(t1.A)=1 and length(t2.B)=1 ;
a b a b
A B A B
b A A B
@ -33,11 +38,14 @@ b A a a
C c a a
D E a a
a a a a
explain select t1.*,t2.* from t1,t1 as t2 where t1.A=t2.B;
explain select t1.*,t2.* from t1,t1 as t2
where t1.A=t2.B and length(t1.A)=1 and length(t2.B)=1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL a NULL NULL NULL 5
1 SIMPLE t1 ALL a NULL NULL NULL 15 Using where
1 SIMPLE t2 ref b b 4 test.t1.a 1 Using where
select t1.*,t2.* from t1,t1 as t2 where t1.A=t2.B order by binary t1.a,t2.a;
select t1.*,t2.* from t1,t1 as t2
where t1.A=t2.B and length(t1.A)=1 and length(t2.B)=1
order by binary t1.a,t2.a;
a b a b
A B a a
A B b A

View file

@ -23,7 +23,7 @@ a b
2 2
3 2
4 4
delete from t1 where b=2 limit 1;
delete from t1 where b=2 order by a limit 1;
select * from t1 order by a;
a b
0 0

View file

@ -4,7 +4,7 @@ insert into t1 values (NULL), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
(10), (11), (12), (13), (14), (15), (16), (17), (18), (19);
explain select * from t1 where not(not(a));
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL a 5 NULL 21 Using where; Using index
1 SIMPLE t1 range a a 5 NULL 2 Using where; Using index
select * from t1 where not(not(a));
a
1
@ -327,7 +327,7 @@ a
0
explain select * from t1 where not((a < 5 or a < 10) and (not(a > 16) or a > 17));
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range a a 5 NULL 3 Using where; Using index
1 SIMPLE t1 range a a 5 NULL 1 Using where; Using index
select * from t1 where not((a < 5 or a < 10) and (not(a > 16) or a > 17));
a
10
@ -342,7 +342,7 @@ a
19
explain select * from t1 where not((a < 5 and a < 10) and (not(a > 16) or a > 17));
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range a a 5 NULL 4 Using where; Using index
1 SIMPLE t1 range a a 5 NULL 1 Using where; Using index
select * from t1 where not((a < 5 and a < 10) and (not(a > 16) or a > 17));
a
5
@ -388,7 +388,7 @@ Table Op Msg_type Msg_text
test.t1 analyze status OK
explain extended select a, not(not(a)), not(a <= 2 and not(a)), not(a not like "1"), not (a not in (1,2)), not(a != 2) from t1 where not(not(a)) having not(not(a));
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 index NULL a 5 NULL 5 100.00 Using where; Using index
1 SIMPLE t1 index a a 5 NULL 5 40.00 Using where; Using index
Warnings:
Note 1003 select `test`.`t1`.`a` AS `a`,(`test`.`t1`.`a` <> 0) AS `not(not(a))`,((`test`.`t1`.`a` > 2) or `test`.`t1`.`a`) AS `not(a <= 2 and not(a))`,(`test`.`t1`.`a` like '1') AS `not(a not like "1")`,(`test`.`t1`.`a` in (1,2)) AS `not (a not in (1,2))`,(`test`.`t1`.`a` = 2) AS `not(a != 2)` from `test`.`t1` where `test`.`t1`.`a` having `test`.`t1`.`a`
Note 1003 select `test`.`t1`.`a` AS `a`,(`test`.`t1`.`a` <> 0) AS `not(not(a))`,((`test`.`t1`.`a` > 2) or `test`.`t1`.`a`) AS `not(a <= 2 and not(a))`,(`test`.`t1`.`a` like '1') AS `not(a not like "1")`,(`test`.`t1`.`a` in (1,2)) AS `not (a not in (1,2))`,(`test`.`t1`.`a` = 2) AS `not(a != 2)` from `test`.`t1` where (`test`.`t1`.`a` <> 0) having (`test`.`t1`.`a` <> 0)
drop table t1;

View file

@ -258,7 +258,7 @@ INSERT INTO t1 VALUES (1,NULL),(2,NULL),(3,1),(4,2),(5,NULL),(6,NULL),(7,3),(8,4
INSERT INTO t2 VALUES (1,NULL),(2,NULL),(3,1),(4,2),(5,NULL),(6,NULL),(7,3),(8,4),(9,NULL),(10,NULL);
explain select id from t1 where uniq_id is null;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref idx1 idx1 5 const 5 Using index condition
1 SIMPLE t1 ref idx1 idx1 5 const 5 Using where
explain select id from t1 where uniq_id =1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const idx1 idx1 5 const 1

View file

@ -514,7 +514,7 @@ id select_type table type possible_keys key key_len ref rows Extra
EXPLAIN SELECT t1.gid, t3.uid from t1, t3 where t1.skr = t3.uid order by t1.gid,t3.skr;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 6 Using temporary; Using filesort
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 2 test.t1.skr 1 Using index condition
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 2 test.t1.skr 1 Using where
drop table t1,t2,t3;
CREATE TABLE t1 (
`titre` char(80) NOT NULL default '',

View file

@ -651,7 +651,7 @@ Variable_name Value
Handler_read_rnd_next 0
show status like 'Handler_read_key';
Variable_name Value
Handler_read_key 10
Handler_read_key 5
show status like 'Handler_read_prev';
Variable_name Value
Handler_read_prev 0

View file

@ -13,9 +13,9 @@ id
update t1 set id = 8 where id = 5;
update t1 set id = 8 where id = 4;
show processlist;
Id User Host db Command Time State Info
x root x test Query x NULL show processlist
x root x test Query x Searching rows for update update t1 set id = 8 where id = 4
Id User Host db Command Time State Info Progress
x root x test Query x NULL show processlist 0.000
x root x test Query x Searching rows for update update t1 set id = 8 where id = 4 0.000
commit;
select * from t1;
id
@ -49,9 +49,9 @@ id
update t1 set id = 8 where id < 4;
update t1 set id = 8 where id = 5;
show processlist;
Id User Host db Command Time State Info
x root x test Query x NULL show processlist
x root x test Query x Searching rows for update update t1 set id = 8 where id = 5
Id User Host db Command Time State Info Progress
x root x test Query x NULL show processlist 0.000
x root x test Query x Searching rows for update update t1 set id = 8 where id = 5 0.000
commit;
select * from t1;
id

View file

@ -465,9 +465,9 @@ def key 253 64 7 Y 0 31 8
def key_len 253 4096 1 Y 0 31 8
def ref 253 2048 0 Y 0 31 8
def rows 8 10 1 Y 32928 0 63
def Extra 253 255 57 N 1 31 8
def Extra 253 255 27 N 1 31 8
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 Using index condition; Rowid-ordered scan; Using filesort
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 Using where; Using filesort
drop table if exists t2;
create table t2 (id smallint, name varchar(20)) ;
prepare stmt1 from ' insert into t2 values(?, ?) ' ;

View file

@ -277,7 +277,7 @@ INSERT INTO t1 VALUES
(33,5),(33,5),(33,5),(33,5),(34,5),(35,5);
EXPLAIN SELECT * FROM t1 WHERE a IN(1,2) AND b=5;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range a,b a 5 NULL 2 Using index condition; Using where; Rowid-ordered scan
1 SIMPLE t1 range a,b a 5 NULL 2 Using where
SELECT * FROM t1 WHERE a IN(1,2) AND b=5;
a b
DROP TABLE t1;
@ -922,7 +922,7 @@ INSERT INTO t1 VALUES
('A2','2005-12-01 08:00:00',1000);
EXPLAIN SELECT * FROM t1 WHERE item='A1' AND started<='2005-12-01 24:00:00';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref PRIMARY PRIMARY 20 const 2 Using index condition
1 SIMPLE t1 ref PRIMARY PRIMARY 20 const 2 Using where
SELECT * FROM t1 WHERE item='A1' AND started<='2005-12-01 24:00:00';
item started price
Warnings:

View file

@ -9,6 +9,6 @@ select user();
user()
#
show processlist;
Id User Host db Command Time State Info
<id> root <host> test <command> <time> <state> <info>
<id> root <host> test <command> <time> <state> <info>
Id User Host db Command Time State Info Progress
<id> root <host> test <command> <time> <state> <info> 0.000
<id> root <host> test <command> <time> <state> <info> 0.000

View file

@ -100,22 +100,30 @@ Variable_name Value
Com_show_status 3
show status like 'hand%write%';
Variable_name Value
Handler_tmp_write 0
Handler_write 5
show status like '%tmp%';
Variable_name Value
Created_tmp_disk_tables 0
Created_tmp_files 0
Created_tmp_tables 0
Handler_tmp_update 0
Handler_tmp_write 0
Rows_tmp_read 5
show status like 'hand%write%';
Variable_name Value
Handler_tmp_write 0
Handler_write 7
show status like '%tmp%';
Variable_name Value
Created_tmp_disk_tables 0
Created_tmp_files 0
Created_tmp_tables 0
Handler_tmp_update 0
Handler_tmp_write 0
Rows_tmp_read 13
show status like 'com_show_status';
Variable_name Value
Com_show_status 8
rnd_diff tmp_table_diff
20 8
28 8

View file

@ -199,10 +199,11 @@ select (select t3.a from t3 where a<8 order by 1 desc limit 1), a from
explain extended select (select t3.a from t3 where a<8 order by 1 desc limit 1), a from
(select * from t2 where a>1) as tt;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 2 100.00 Using where
1 PRIMARY <derived3> ALL NULL NULL NULL NULL 2 100.00
3 DERIVED t2 ALL NULL NULL NULL NULL 2 100.00 Using where
2 SUBQUERY t3 ALL NULL NULL NULL NULL 3 100.00 Using where; Using filesort
Warnings:
Note 1003 select (select `test`.`t3`.`a` from `test`.`t3` where (`test`.`t3`.`a` < 8) order by 1 desc limit 1) AS `(select t3.a from t3 where a<8 order by 1 desc limit 1)`,`test`.`t2`.`a` AS `a` from `test`.`t2` where (`test`.`t2`.`a` > 1)
Note 1003 select (select `test`.`t3`.`a` from `test`.`t3` where (`test`.`t3`.`a` < 8) order by 1 desc limit 1) AS `(select t3.a from t3 where a<8 order by 1 desc limit 1)`,`tt`.`a` AS `a` from (select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t2` where (`test`.`t2`.`a` > 1)) `tt`
select * from t1 where t1.a=(select t2.a from t2 where t2.b=(select max(a) from t3) order by 1 desc limit 1);
a
2
@ -223,7 +224,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
3 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 3 100.00 Using where
Warnings:
Note 1276 Field or reference 'test.t4.a' of SELECT #3 was resolved in SELECT #1
Note 1003 select `test`.`t4`.`b` AS `b`,(select avg((`test`.`t2`.`a` + (select min(`test`.`t3`.`a`) from `test`.`t3` where (`test`.`t3`.`a` >= `test`.`t4`.`a`)))) from `test`.`t2`) AS `(select avg(t2.a+(select min(t3.a) from t3 where t3.a >= t4.a)) from t2)` from `test`.`t4`
Note 1003 select `test`.`t4`.`b` AS `b`,<expr_cache><`test`.`t4`.`a`>((select avg((`test`.`t2`.`a` + (select min(`test`.`t3`.`a`) from `test`.`t3` where (`test`.`t3`.`a` >= `test`.`t4`.`a`)))) from `test`.`t2`)) AS `(select avg(t2.a+(select min(t3.a) from t3 where t3.a >= t4.a)) from t2)` from `test`.`t4`
select * from t3 where exists (select * from t2 where t2.b=t3.a);
a
7
@ -269,7 +270,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where
2 SUBQUERY t2 ALL NULL NULL NULL NULL 3 100.00
Warnings:
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,(`test`.`t3`.`a` >= (select min(`test`.`t2`.`b`) from `test`.`t2`))))
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,((select min(`test`.`t2`.`b`) from `test`.`t2`) <= <cache>(`test`.`t3`.`a`))))
select * from t3 where a >= all (select b from t2);
a
7
@ -361,12 +362,12 @@ INSERT INTO t8 (pseudo,email) VALUES ('joce1','test1');
INSERT INTO t8 (pseudo,email) VALUES ('2joce1','2test1');
EXPLAIN EXTENDED SELECT pseudo,(SELECT email FROM t8 WHERE pseudo=(SELECT pseudo FROM t8 WHERE pseudo='joce')) FROM t8 WHERE pseudo=(SELECT pseudo FROM t8 WHERE pseudo='joce');
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t8 const PRIMARY PRIMARY 37 const 1 100.00 Using index
1 PRIMARY t8 const PRIMARY PRIMARY 37 const 1 100.00 Using where; Using index
4 SUBQUERY t8 const PRIMARY PRIMARY 37 const 1 100.00 Using index
2 SUBQUERY t8 const PRIMARY PRIMARY 37 const 1 100.00
2 SUBQUERY t8 const PRIMARY PRIMARY 37 const 1 100.00 Using where
3 SUBQUERY t8 const PRIMARY PRIMARY 37 const 1 100.00 Using index
Warnings:
Note 1003 select 'joce' AS `pseudo`,(select 'test' from `test`.`t8` where ('joce' = (select 'joce' from `test`.`t8` where 1))) AS `(SELECT email FROM t8 WHERE pseudo=(SELECT pseudo FROM t8 WHERE pseudo='joce'))` from `test`.`t8` where ('joce' = (select 'joce' from `test`.`t8` where 1))
Note 1003 select `test`.`t8`.`pseudo` AS `pseudo`,(select `test`.`t8`.`email` from `test`.`t8` where (`test`.`t8`.`pseudo` = (select 'joce' from `test`.`t8` where 1))) AS `(SELECT email FROM t8 WHERE pseudo=(SELECT pseudo FROM t8 WHERE pseudo='joce'))` from `test`.`t8` where (`test`.`t8`.`pseudo` = (select 'joce' from `test`.`t8` where 1))
SELECT pseudo FROM t8 WHERE pseudo=(SELECT pseudo,email FROM
t8 WHERE pseudo='joce');
ERROR 21000: Operand should contain 1 column(s)
@ -534,18 +535,24 @@ SELECT numreponse, (SELECT numeropost FROM t1 HAVING numreponse=1) FROM (SELECT
numreponse (SELECT numeropost FROM t1 HAVING numreponse=1)
INSERT INTO t1 (numeropost,numreponse,pseudo) VALUES (1,1,'joce'),(1,2,'joce'),(1,3,'test');
EXPLAIN EXTENDED SELECT numreponse FROM t1 WHERE numeropost='1' AND numreponse=(SELECT 1 FROM t1 WHERE numeropost='1');
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 const PRIMARY,numreponse PRIMARY 7 const,const 1 100.00 Using where; Using index
2 SUBQUERY t1 ref PRIMARY PRIMARY 3 const 2 100.00 Using index
Warnings:
Note 1003 select `test`.`t1`.`numreponse` AS `numreponse` from `test`.`t1` where ((`test`.`t1`.`numeropost` = '1') and (`test`.`t1`.`numreponse` = (select 1 from `test`.`t1` where (`test`.`t1`.`numeropost` = '1'))))
SELECT numreponse FROM t1 WHERE numeropost='1' AND numreponse=(SELECT 1 FROM t1 WHERE numeropost='1');
ERROR 21000: Subquery returns more than 1 row
EXPLAIN EXTENDED SELECT MAX(numreponse) FROM t1 WHERE numeropost='1';
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
Warnings:
Note 1003 select max(`test`.`t1`.`numreponse`) AS `MAX(numreponse)` from `test`.`t1` where multiple equal(1, `test`.`t1`.`numeropost`)
Note 1003 select max(`test`.`t1`.`numreponse`) AS `MAX(numreponse)` from `test`.`t1` where (`test`.`t1`.`numeropost` = '1')
EXPLAIN EXTENDED SELECT numreponse FROM t1 WHERE numeropost='1' AND numreponse=(SELECT MAX(numreponse) FROM t1 WHERE numeropost='1');
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 const PRIMARY,numreponse PRIMARY 7 const,const 1 100.00 Using index
1 PRIMARY t1 const PRIMARY,numreponse PRIMARY 7 const,const 1 100.00 Using where; Using index
2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
Warnings:
Note 1003 select 3 AS `numreponse` from `test`.`t1` where ((3 = 3))
Note 1003 select `test`.`t1`.`numreponse` AS `numreponse` from `test`.`t1` where ((`test`.`t1`.`numeropost` = '1') and (`test`.`t1`.`numreponse` = (select max(`test`.`t1`.`numreponse`) from `test`.`t1` where (`test`.`t1`.`numeropost` = '1'))))
drop table t1;
CREATE TABLE t1 (a int(1));
INSERT INTO t1 VALUES (1);
@ -1232,7 +1239,7 @@ create table t1 (id int not null auto_increment primary key, salary int, key(sal
insert into t1 (salary) values (100),(1000),(10000),(10),(500),(5000),(50000);
explain extended SELECT id FROM t1 where salary = (SELECT MAX(salary) FROM t1);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 ref salary salary 5 const 1 100.00 Using where
1 PRIMARY t1 ref salary salary 5 const 0 0.00 Using where
2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
Warnings:
Note 1003 select `test`.`t1`.`id` AS `id` from `test`.`t1` where (`test`.`t1`.`salary` = (select max(`test`.`t1`.`salary`) from `test`.`t1`))
@ -1408,7 +1415,7 @@ INSERT INTO t1 VALUES ('z','?');
select * from t1 where s1 > (select max(s2) from t1);
ERROR HY000: Illegal mix of collations (latin1_german1_ci,IMPLICIT) and (latin1_swedish_ci,IMPLICIT) for operation '>'
select * from t1 where s1 > any (select max(s2) from t1);
ERROR HY000: Illegal mix of collations (latin1_german1_ci,IMPLICIT) and (latin1_swedish_ci,IMPLICIT) for operation '>'
ERROR HY000: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (latin1_german1_ci,IMPLICIT) for operation '<'
drop table t1;
create table t1(toid int,rd int);
create table t2(userid int,pmnew int,pmtotal int);
@ -1484,7 +1491,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
Warnings:
Note 1003 select `test`.`t1`.`s1` AS `s1`,(not(<expr_cache><`test`.`t1`.`s1`>(<in_optimizer>(`test`.`t1`.`s1`,<exists>(<index_lookup>(<cache>(`test`.`t1`.`s1`) in t2 on s1 checking NULL where (`test`.`t2`.`s1` < 'a2') having trigcond(<is_not_null_test>(`test`.`t2`.`s1`)))))))) AS `s1 NOT IN (SELECT s1 FROM t2 WHERE s1 < 'a2')` from `test`.`t1`
drop table t1,t2;
create table t2 (a int, b int);
create table t2 (a int, b int not null);
create table t3 (a int);
insert into t3 values (6),(7),(3);
select * from t3 where a >= all (select b from t2);
@ -1497,7 +1504,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where
2 SUBQUERY t2 ALL NULL NULL NULL NULL 0 0.00
Warnings:
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,(`test`.`t3`.`a` < (select max(`test`.`t2`.`b`) from `test`.`t2`))))
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,((select max(`test`.`t2`.`b`) from `test`.`t2`) > <cache>(`test`.`t3`.`a`))))
select * from t3 where a >= some (select b from t2);
a
explain extended select * from t3 where a >= some (select b from t2);
@ -1505,7 +1512,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where
2 SUBQUERY t2 ALL NULL NULL NULL NULL 0 0.00
Warnings:
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,(`test`.`t3`.`a` >= (select min(`test`.`t2`.`b`) from `test`.`t2`))))
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,((select min(`test`.`t2`.`b`) from `test`.`t2`) <= <cache>(`test`.`t3`.`a`))))
select * from t3 where a >= all (select b from t2 group by 1);
a
6
@ -1516,7 +1523,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where
2 SUBQUERY t2 ALL NULL NULL NULL NULL 0 0.00 Using temporary
Warnings:
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,(`test`.`t3`.`a` < <max>(select `test`.`t2`.`b` from `test`.`t2` group by 1))))
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,(<max>(select `test`.`t2`.`b` from `test`.`t2` group by 1) > <cache>(`test`.`t3`.`a`))))
select * from t3 where a >= some (select b from t2 group by 1);
a
explain extended select * from t3 where a >= some (select b from t2 group by 1);
@ -1524,7 +1531,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where
2 SUBQUERY t2 ALL NULL NULL NULL NULL 0 0.00 Using temporary
Warnings:
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,(`test`.`t3`.`a` >= <min>(select `test`.`t2`.`b` from `test`.`t2` group by 1))))
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,(<min>(select `test`.`t2`.`b` from `test`.`t2` group by 1) <= <cache>(`test`.`t3`.`a`))))
select * from t3 where NULL >= any (select b from t2);
a
explain extended select * from t3 where NULL >= any (select b from t2);
@ -1532,7 +1539,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00
2 SUBQUERY t2 ALL NULL NULL NULL NULL 0 0.00
Warnings:
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(NULL,(NULL >= (select min(`test`.`t2`.`b`) from `test`.`t2`))))
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(NULL,((select min(`test`.`t2`.`b`) from `test`.`t2`) <= NULL)))
select * from t3 where NULL >= any (select b from t2 group by 1);
a
explain extended select * from t3 where NULL >= any (select b from t2 group by 1);
@ -1540,7 +1547,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00
2 SUBQUERY t2 ALL NULL NULL NULL NULL 0 0.00 Using temporary
Warnings:
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(NULL,(NULL >= <min>(select `test`.`t2`.`b` from `test`.`t2` group by 1))))
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(NULL,(<min>(select `test`.`t2`.`b` from `test`.`t2` group by 1) <= NULL)))
select * from t3 where NULL >= some (select b from t2);
a
explain extended select * from t3 where NULL >= some (select b from t2);
@ -1548,7 +1555,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00
2 SUBQUERY t2 ALL NULL NULL NULL NULL 0 0.00
Warnings:
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(NULL,(NULL >= (select min(`test`.`t2`.`b`) from `test`.`t2`))))
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(NULL,((select min(`test`.`t2`.`b`) from `test`.`t2`) <= NULL)))
select * from t3 where NULL >= some (select b from t2 group by 1);
a
explain extended select * from t3 where NULL >= some (select b from t2 group by 1);
@ -1556,7 +1563,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00
2 SUBQUERY t2 ALL NULL NULL NULL NULL 0 0.00 Using temporary
Warnings:
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(NULL,(NULL >= <min>(select `test`.`t2`.`b` from `test`.`t2` group by 1))))
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(NULL,(<min>(select `test`.`t2`.`b` from `test`.`t2` group by 1) <= NULL)))
insert into t2 values (2,2), (2,1), (3,3), (3,1);
select * from t3 where a > all (select max(b) from t2 group by a);
a
@ -1567,7 +1574,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where
2 SUBQUERY t2 ALL NULL NULL NULL NULL 4 100.00 Using temporary
Warnings:
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,(`test`.`t3`.`a` <= <max>(select max(`test`.`t2`.`b`) from `test`.`t2` group by `test`.`t2`.`a`))))
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,(<max>(select max(`test`.`t2`.`b`) from `test`.`t2` group by `test`.`t2`.`a`) >= <cache>(`test`.`t3`.`a`))))
drop table t2, t3;
CREATE TABLE `t1` ( `id` mediumint(9) NOT NULL auto_increment, `taskid` bigint(20) NOT NULL default '0', `dbid` int(11) NOT NULL default '0', `create_date` datetime NOT NULL default '0000-00-00 00:00:00', `last_update` datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (`id`)) ENGINE=MyISAM CHARSET=latin1 AUTO_INCREMENT=3 ;
INSERT INTO `t1` (`id`, `taskid`, `dbid`, `create_date`,`last_update`) VALUES (1, 1, 15, '2003-09-29 10:31:36', '2003-09-29 10:31:36'), (2, 1, 21, now(), now());
@ -1618,7 +1625,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
3 UNION t1 ALL NULL NULL NULL NULL 1 100.00
NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL
Warnings:
Note 1003 select `test`.`t1`.`s1` AS `s1` from `test`.`t1` where <nop>(<in_optimizer>('f',('f' > <min>(select `test`.`t1`.`s1` from `test`.`t1` union select `test`.`t1`.`s1` from `test`.`t1`))))
Note 1003 select `test`.`t1`.`s1` AS `s1` from `test`.`t1` where <nop>(<in_optimizer>('f',(<min>(select `test`.`t1`.`s1` from `test`.`t1` union select `test`.`t1`.`s1` from `test`.`t1`) < 'f')))
drop table t1;
CREATE TABLE t1 (number char(11) NOT NULL default '') ENGINE=MyISAM CHARSET=latin1;
INSERT INTO t1 VALUES ('69294728265'),('18621828126'),('89356874041'),('95895001874');
@ -2824,7 +2831,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 8 100.00
2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 9 100.00 Using where
Warnings:
Note 1003 select `test`.`t1`.`one` AS `one`,`test`.`t1`.`two` AS `two`,<expr_cache><`test`.`t1`.`two`,`test`.`t1`.`one`>(<in_optimizer>((`test`.`t1`.`one`,`test`.`t1`.`two`),<exists>(select `test`.`t2`.`one`,`test`.`t2`.`two` from `test`.`t2` where ((`test`.`t2`.`flag` = '0') and trigcond(((<cache>(`test`.`t1`.`one`) = `test`.`t2`.`one`) or isnull(`test`.`t2`.`one`))) and trigcond(((<cache>(`test`.`t1`.`two`) = `test`.`t2`.`two`) or isnull(`test`.`t2`.`two`)))) having (trigcond(<is_not_null_test>(`test`.`t2`.`one`)) and trigcond(<is_not_null_test>(`test`.`t2`.`two`)))))) AS `test` from `test`.`t1`
Note 1003 select `test`.`t1`.`one` AS `one`,`test`.`t1`.`two` AS `two`,<expr_cache><`test`.`t1`.`one`,`test`.`t1`.`two`>(<in_optimizer>((`test`.`t1`.`one`,`test`.`t1`.`two`),<exists>(select `test`.`t2`.`one`,`test`.`t2`.`two` from `test`.`t2` where ((`test`.`t2`.`flag` = '0') and trigcond(((<cache>(`test`.`t1`.`one`) = `test`.`t2`.`one`) or isnull(`test`.`t2`.`one`))) and trigcond(((<cache>(`test`.`t1`.`two`) = `test`.`t2`.`two`) or isnull(`test`.`t2`.`two`)))) having (trigcond(<is_not_null_test>(`test`.`t2`.`one`)) and trigcond(<is_not_null_test>(`test`.`t2`.`two`)))))) AS `test` from `test`.`t1`
explain extended SELECT one,two from t1 where ROW(one,two) IN (SELECT one,two FROM t2 WHERE flag = 'N');
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 8 100.00
@ -2836,7 +2843,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 8 100.00
2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 9 100.00 Using where; Using temporary
Warnings:
Note 1003 select `test`.`t1`.`one` AS `one`,`test`.`t1`.`two` AS `two`,<expr_cache><`test`.`t1`.`two`,`test`.`t1`.`one`>(<in_optimizer>((`test`.`t1`.`one`,`test`.`t1`.`two`),<exists>(select `test`.`t2`.`one`,`test`.`t2`.`two` from `test`.`t2` where (`test`.`t2`.`flag` = '0') group by `test`.`t2`.`one`,`test`.`t2`.`two` having (trigcond(((<cache>(`test`.`t1`.`one`) = `test`.`t2`.`one`) or isnull(`test`.`t2`.`one`))) and trigcond(((<cache>(`test`.`t1`.`two`) = `test`.`t2`.`two`) or isnull(`test`.`t2`.`two`))) and trigcond(<is_not_null_test>(`test`.`t2`.`one`)) and trigcond(<is_not_null_test>(`test`.`t2`.`two`)))))) AS `test` from `test`.`t1`
Note 1003 select `test`.`t1`.`one` AS `one`,`test`.`t1`.`two` AS `two`,<expr_cache><`test`.`t1`.`one`,`test`.`t1`.`two`>(<in_optimizer>((`test`.`t1`.`one`,`test`.`t1`.`two`),<exists>(select `test`.`t2`.`one`,`test`.`t2`.`two` from `test`.`t2` where (`test`.`t2`.`flag` = '0') group by `test`.`t2`.`one`,`test`.`t2`.`two` having (trigcond(((<cache>(`test`.`t1`.`one`) = `test`.`t2`.`one`) or isnull(`test`.`t2`.`one`))) and trigcond(((<cache>(`test`.`t1`.`two`) = `test`.`t2`.`two`) or isnull(`test`.`t2`.`two`))) and trigcond(<is_not_null_test>(`test`.`t2`.`one`)) and trigcond(<is_not_null_test>(`test`.`t2`.`two`)))))) AS `test` from `test`.`t1`
DROP TABLE t1,t2;
set @@optimizer_switch=@save_optimizer_switch;
CREATE TABLE t1 (a char(5), b char(5));
@ -2953,7 +2960,7 @@ ON r.a = (SELECT t2.a FROM t2 WHERE t2.c = t1.a AND t2.b <= '359899'
ORDER BY t2.c DESC, t2.b DESC LIMIT 1) WHERE t1.a = 10;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 const PRIMARY PRIMARY 4 const 1 Using index
1 PRIMARY r const PRIMARY PRIMARY 4 const 1
1 PRIMARY r eq_ref PRIMARY PRIMARY 4 const 1 Using where
2 DEPENDENT SUBQUERY t2 range b b 40 NULL 1 Using where
SELECT sql_no_cache t1.a, r.a, r.b FROM t1 LEFT JOIN t2 r
ON r.a = (SELECT t2.a FROM t2 WHERE t2.c = t1.a AND t2.b <= '359899'
@ -2965,7 +2972,7 @@ ON r.a = (SELECT t2.a FROM t2 WHERE t2.c = t1.a AND t2.b <= '359899'
ORDER BY t2.c, t2.b LIMIT 1) WHERE t1.a = 10;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 const PRIMARY PRIMARY 4 const 1 Using index
1 PRIMARY r const PRIMARY PRIMARY 4 const 1
1 PRIMARY r eq_ref PRIMARY PRIMARY 4 const 1 Using where
2 DEPENDENT SUBQUERY t2 range b b 40 NULL 1 Using where
SELECT sql_no_cache t1.a, r.a, r.b FROM t1 LEFT JOIN t2 r
ON r.a = (SELECT t2.a FROM t2 WHERE t2.c = t1.a AND t2.b <= '359899'
@ -4046,7 +4053,7 @@ CREATE TABLE t1 (a int, b int, KEY (a));
INSERT INTO t1 VALUES (1,1),(2,1);
EXPLAIN SELECT 1 FROM t1 WHERE a = (SELECT COUNT(*) FROM t1 GROUP BY b);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ref a a 5 const 1 Using where; Using index
1 PRIMARY t1 ref a a 5 const 0 Using where; Using index
2 SUBQUERY t1 ALL NULL NULL NULL NULL 2 Using temporary; Using filesort
DROP TABLE t1;
CREATE TABLE t1 (id int NOT NULL, st CHAR(2), INDEX idx(id));
@ -4217,8 +4224,8 @@ CREATE INDEX I1 ON t1 (a);
CREATE INDEX I2 ON t1 (b);
EXPLAIN SELECT a,b FROM t1 WHERE b IN (SELECT a FROM t1);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 index I1 I1 2 NULL 2 Using where; Using index; LooseScan
1 PRIMARY t1 ref I2 I2 13 test.t1.a 1 Using where
1 PRIMARY t1 ALL I2 NULL NULL NULL 2 Using where
1 PRIMARY t1 ref I1 I1 2 test.t1.b 1 Using where; Using index; FirstMatch(t1)
SELECT a,b FROM t1 WHERE b IN (SELECT a FROM t1);
a b
CREATE TABLE t2 (a VARCHAR(1), b VARCHAR(10));
@ -4227,15 +4234,15 @@ CREATE INDEX I1 ON t2 (a);
CREATE INDEX I2 ON t2 (b);
EXPLAIN SELECT a,b FROM t2 WHERE b IN (SELECT a FROM t2);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 index I1 I1 4 NULL 2 Using where; Using index; LooseScan
1 PRIMARY t2 ref I2 I2 13 test.t2.a 1 Using where
1 PRIMARY t2 ALL I2 NULL NULL NULL 2 Using where
1 PRIMARY t2 ref I1 I1 4 test.t2.b 1 Using where; Using index; FirstMatch(t2)
SELECT a,b FROM t2 WHERE b IN (SELECT a FROM t2);
a b
EXPLAIN
SELECT a,b FROM t1 WHERE b IN (SELECT a FROM t1 WHERE LENGTH(a)<500);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 index I1 I1 2 NULL 2 Using where; Using index; LooseScan
1 PRIMARY t1 ref I2 I2 13 test.t1.a 1 Using where
1 PRIMARY t1 ALL I2 NULL NULL NULL 2 Using where
1 PRIMARY t1 ref I1 I1 2 test.t1.b 1 Using where; Using index; FirstMatch(t1)
SELECT a,b FROM t1 WHERE b IN (SELECT a FROM t1 WHERE LENGTH(a)<500);
a b
DROP TABLE t1,t2;

View file

@ -587,6 +587,7 @@ SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
--echo . costs. To combat the plan change it uses --sorted_result and
--echo . and --replace tricks
INSERT INTO t1 VALUES (-1,133,0), (-2,12,0), (-3,11,0), (-5,15,0);
CREATE INDEX idx_b ON t1(b);
CREATE INDEX idx_a ON t0(a);
@ -614,7 +615,7 @@ SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
)
ON (t3.b=2 OR t3.c IS NULL) AND (t6.b=2 OR t6.c IS NULL) AND
(t1.b=t5.b OR t3.c IS NULL OR t6.c IS NULL or t8.c IS NULL) AND
(t1.a != 2),
(t1.a != 2) AND t1.a>0,
t9
WHERE t0.a=1 AND
t0.b=t1.b AND
@ -653,7 +654,7 @@ SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
)
ON (t3.b=2 OR t3.c IS NULL) AND (t6.b=2 OR t6.c IS NULL) AND
(t1.b=t5.b OR t3.c IS NULL OR t6.c IS NULL or t8.c IS NULL) AND
(t1.a != 2),
(t1.a != 2) AND t1.a>0,
t9
WHERE t0.a=1 AND
t0.b=t1.b AND

View file

@ -13,11 +13,19 @@ CREATE TABLE t1 (
);
INSERT INTO t1 VALUES ('A','B'),('b','A'),('C','c'),('D','E'),('a','a');
INSERT INTO t1 VALUES
('AA','BB'),('bb','AA'),('CC','cc'),('DD','EE'),('aa','aa');
INSERT INTO t1 VALUES
('AAA','BBB'),('bbb','AAA'),('CCC','ccc'),('DDD','EEE'),('aaa','aaa');
select * from t1,t1 as t2;
explain select t1.*,t2.* from t1,t1 as t2 where t1.A=t2.B;
select * from t1,t1 as t2
where length(t1.A)=1 and length(t2.B)=1 ;
explain select t1.*,t2.* from t1,t1 as t2
where t1.A=t2.B and length(t1.A)=1 and length(t2.B)=1;
#select t1.*,t2.* from t1,t1 as t2 where t1.A=t2.B;
select t1.*,t2.* from t1,t1 as t2 where t1.A=t2.B order by binary t1.a,t2.a;
select t1.*,t2.* from t1,t1 as t2
where t1.A=t2.B and length(t1.A)=1 and length(t2.B)=1
order by binary t1.a,t2.a;
select * from t1 where a='a';
drop table t1;

View file

@ -15,7 +15,7 @@ update t1 set b=2 where b=1 limit 2;
select * from t1 order by a; # PBXT: required for consistent result
update t1 set b=4 where b=1;
select * from t1 order by a; # PBXT: required for consistent result
delete from t1 where b=2 limit 1;
delete from t1 where b=2 order by a limit 1;
select * from t1 order by a; # PBXT: required for consistent result
delete from t1 limit 1;
select * from t1 order by a; # PBXT: required for consistent result

View file

@ -278,8 +278,9 @@ SELECT (SELECT numeropost FROM t1 HAVING numreponse=a),numreponse FROM (SELECT *
SELECT numreponse, (SELECT numeropost FROM t1 HAVING numreponse=a) FROM (SELECT * FROM t1) as a;
SELECT numreponse, (SELECT numeropost FROM t1 HAVING numreponse=1) FROM (SELECT * FROM t1) as a;
INSERT INTO t1 (numeropost,numreponse,pseudo) VALUES (1,1,'joce'),(1,2,'joce'),(1,3,'test');
-- error 1242
EXPLAIN EXTENDED SELECT numreponse FROM t1 WHERE numeropost='1' AND numreponse=(SELECT 1 FROM t1 WHERE numeropost='1');
-- error 1242
SELECT numreponse FROM t1 WHERE numeropost='1' AND numreponse=(SELECT 1 FROM t1 WHERE numeropost='1');
EXPLAIN EXTENDED SELECT MAX(numreponse) FROM t1 WHERE numeropost='1';
EXPLAIN EXTENDED SELECT numreponse FROM t1 WHERE numeropost='1' AND numreponse=(SELECT MAX(numreponse) FROM t1 WHERE numeropost='1');
drop table t1;
@ -928,7 +929,7 @@ drop table t1,t2;
#
# correct ALL optimisation
#
create table t2 (a int, b int);
create table t2 (a int, b int not null);
create table t3 (a int);
insert into t3 values (6),(7),(3);
select * from t3 where a >= all (select b from t2);

View file

@ -1,6 +1,6 @@
include/master-slave.inc
[connection master]
call mtr.add_suppression("Can.t find record in .t[12].* Error_code: 1032");
call mtr.add_suppression("Can.t find record in .t[12].*");
call mtr.add_suppression("Slave: Cannot delete or update a parent row: a foreign key constraint fails .* Error_code: 1451");
call mtr.add_suppression("Slave: Cannot add or update a child row: a foreign key constraint fails .* Error_code: 1452");
call mtr.add_suppression("Slave SQL.*Could not execute Write_rows event on table test.* Duplicate entry .1. for key .PRIMARY.* Error_code: 1062");

View file

@ -127,7 +127,7 @@ slave-bin.000001 # Rotate 2 # slave-bin.000002;pos=4
########################################################################
# INSERTs DELAYED ON MASTERs
########################################################################
SET SESSION binlog_annotate_rows_events = ON;
SET SESSION binlog_annotate_row_events = ON;
INSERT DELAYED INTO test1.t4 VALUES (1,1);
FLUSH TABLES;
SELECT * FROM test1.t4 ORDER BY a;

View file

@ -109,7 +109,7 @@ slave-bin.000001 # Rotate 2 # slave-bin.000002;pos=4
########################################################################
# INSERTs DELAYED ON MASTERs
########################################################################
SET SESSION binlog_annotate_rows_events = ON;
SET SESSION binlog_annotate_row_events = ON;
INSERT DELAYED INTO test1.t4 VALUES (1,1);
FLUSH TABLES;
SELECT * FROM test1.t4 ORDER BY a;

View file

@ -48,7 +48,7 @@ select (@id := id) - id from t2;
kill @id;
drop table t2;
Got one of the listed errors
include/wait_for_slave_sql_error_and_skip.inc [errno=1053]
include/wait_for_slave_sql_error_and_skip.inc [errno=1927]
select count(*) from t1;
count(*)
5000

View file

@ -9,7 +9,7 @@ source include/have_innodb.inc;
# Add suppression for expected warning(s) in slaves error log
call mtr.add_suppression("Can.t find record in .t[12].* Error_code: 1032");
call mtr.add_suppression("Can.t find record in .t[12].*");
call mtr.add_suppression("Slave: Cannot delete or update a parent row: a foreign key constraint fails .* Error_code: 1451");
call mtr.add_suppression("Slave: Cannot add or update a child row: a foreign key constraint fails .* Error_code: 1452");
call mtr.add_suppression("Slave SQL.*Could not execute Write_rows event on table test.* Duplicate entry .1. for key .PRIMARY.* Error_code: 1062");

View file

@ -1 +1 @@
--log-slave-updates --replicate-annotate-rows-events --replicate-ignore-table=test1.xt1 --replicate-ignore-table=test1.xt2
--log-slave-updates --replicate-annotate-row-events --replicate-ignore-table=test1.xt1 --replicate-ignore-table=test1.xt2

View file

@ -1,7 +1,7 @@
###############################################################################
# WL47: Store in binlog text of statements that caused RBR events
# Wrapper for extra/rpl/rpl_row_annotate.test.
# Intended to test that if the --replicate-annotate-rows-events option
# Intended to test that if the --replicate-annotate-row-events option
# is switched on on slave then Annotate_events:
# - are reproduced on slave
# - are reproduced only once for "multi-table-maps" rbr queries

View file

@ -1,7 +1,7 @@
###############################################################################
# WL47: Store in binlog text of statements that caused RBR events
# Wrapper for extra/rpl/rpl_row_annotate.test.
# Intended to test that if the --replicate-annotate-rows-events option
# Intended to test that if the --replicate-annotate-row-events option
# is switched off on slave then Annotate_events are not reproduced.
###############################################################################

View file

@ -96,14 +96,15 @@ drop table t2;
connection master;
# The get_lock function causes warning for unsafe statement.
--disable_warnings
--error 1317,2013
# 2013 = CR_SERVER_LOST
--error ER_QUERY_INTERRUPTED,ER_CONNECTION_KILLED,2013
reap;
--enable_warnings
connection slave;
# The SQL slave thread should now have stopped because the query was killed on
# the master (so it has a non-zero error code in the binlog).
# 1053 = ER_SERVER_SHUTDOWN
--let $slave_sql_errno= 1053
# 1927 = ER_CONNECTION_KILLED
--let $slave_sql_errno= 1927
--source include/wait_for_slave_sql_error_and_skip.inc
select count(*) from t1;

View file

@ -139,17 +139,20 @@ create table t2 (c int, d int, v int as (d+1), index idx(c));
insert into t2(c,d) values
(20, 100), (20, 300), (30, 100), (30, 200), (40, 500),
(70, 100), (40, 300), (60, 100), (40, 100), (70, 100);
insert into t2(c,d) values
(120, 100), (150, 300), (130, 100), (130, 200), (140, 500),
(170, 100), (180, 300), (160, 100), (40, 100), (170, 100);
set join_cache_level=6;
explain
select * from t1,t2 where t1.b=t2.c and d <= 100;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where
1 SIMPLE t2 ref idx idx 5 test.t1.b 2 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
1 SIMPLE t2 ref idx idx 5 test.t1.b 2 Using where
select * from t1,t2 where t1.b=t2.c and d <= 100;
a b c d v
3 30 30 100 101
4 20 20 100 101
1 20 20 100 101
3 30 30 100 101
set join_cache_level=default;
drop table t1, t2;
create table t1 (a bigint, b bigint as (a > '2'));

View file

@ -44,7 +44,7 @@ a b c
1 -1 -1
explain select * from t3 where c>=-1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t3 range c c 5 NULL 1 Using index condition; Rowid-ordered scan
1 SIMPLE t3 range c c 5 NULL 1 Using where
# select_type=SIMPLE, type=ref
select * from t1,t3 where t1.c=t3.c and t3.c=-1;
a b c a b c
@ -98,7 +98,8 @@ a b c
NULL NULL NULL
explain select * from (select a,b,c from t1) as t11;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 5
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 5
2 DERIVED t1 ALL NULL NULL NULL NULL 5
###
### Using aggregate functions with/without DISTINCT
###
@ -136,11 +137,11 @@ id select_type table type possible_keys key key_len ref rows Extra
# SELECT * FROM tbl_name WHERE <vcol expr>
select * from t3 where c >= -2;
a b c
1 -1 -1
2 -2 -2
1 -1 -1
explain select * from t3 where c >= -2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t3 range c c 5 NULL 1 Using index condition; Rowid-ordered scan
1 SIMPLE t3 range c c 5 NULL 1 Using where
# SELECT * FROM tbl_name WHERE <non-vcol expr>
select * from t3 where a between 1 and 2;
a b c
@ -160,11 +161,11 @@ id select_type table type possible_keys key key_len ref rows Extra
# SELECT * FROM tbl_name WHERE <indexed vcol expr>
select * from t3 where c between -2 and -1;
a b c
1 -1 -1
2 -2 -2
1 -1 -1
explain select * from t3 where c between -2 and -1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t3 range c c 5 NULL 1 Using index condition; Rowid-ordered scan
1 SIMPLE t3 range c c 5 NULL 1 Using where
# SELECT * FROM tbl_name WHERE <non-vcol expr> ORDER BY <non-indexed vcol>
select * from t3 where a between 1 and 2 order by b;
a b c
@ -204,7 +205,7 @@ a b c
1 -1 -1
explain select * from t3 where c between -2 and -1 order by b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t3 range c c 5 NULL 1 Using index condition; Rowid-ordered scan; Using filesort
1 SIMPLE t3 range c c 5 NULL 1 Using where; Using filesort
# SELECT * FROM tbl_name WHERE <non-indexed vcol expr> ORDER BY <indexed vcol>
select * from t3 where b between -2 and -1 order by c;
a b c
@ -220,7 +221,7 @@ a b c
1 -1 -1
explain select * from t3 where c between -2 and -1 order by c;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t3 range c c 5 NULL 1 Using index condition
1 SIMPLE t3 range c c 5 NULL 1 Using where
# SELECT sum(<non-indexed vcol>) FROM tbl_name GROUP BY <non-indexed vcol>
select sum(b) from t1 group by b;
sum(b)

View file

@ -44,7 +44,7 @@ a b c
1 -1 -1
explain select * from t3 where c>=-1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t3 range c c 5 NULL 2 Using index condition; Rowid-ordered scan
1 SIMPLE t3 range c c 5 NULL 2 Using where
# select_type=SIMPLE, type=ref
select * from t1,t3 where t1.c=t3.c and t3.c=-1;
a b c a b c
@ -98,7 +98,8 @@ a b c
NULL NULL NULL
explain select * from (select a,b,c from t1) as t11;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 5
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 5
2 DERIVED t1 ALL NULL NULL NULL NULL 5
###
### Using aggregate functions with/without DISTINCT
###
@ -140,15 +141,15 @@ a b c
1 -1 -1
explain select * from t3 where c >= -2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t3 range c c 5 NULL 2 Using index condition; Rowid-ordered scan
1 SIMPLE t3 range c c 5 NULL 2 Using where
# SELECT * FROM tbl_name WHERE <non-vcol expr>
select * from t3 where a between 1 and 2;
a b c
2 -2 -2
1 -1 -1
2 -2 -2
explain select * from t3 where a between 1 and 2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t3 range PRIMARY PRIMARY 4 NULL 1 Using index condition; Rowid-ordered scan
1 SIMPLE t3 range PRIMARY PRIMARY 4 NULL 1 Using where
# SELECT * FROM tbl_name WHERE <non-indexed vcol expr>
select * from t3 where b between -2 and -1;
a b c
@ -164,7 +165,7 @@ a b c
1 -1 -1
explain select * from t3 where c between -2 and -1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t3 range c c 5 NULL 1 Using index condition; Rowid-ordered scan
1 SIMPLE t3 range c c 5 NULL 1 Using where
# SELECT * FROM tbl_name WHERE <non-vcol expr> ORDER BY <indexed vcol>
select * from t3 where a between 1 and 2 order by c;
a b c
@ -172,7 +173,7 @@ a b c
1 -1 -1
explain select * from t3 where a between 1 and 2 order by c;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t3 range PRIMARY PRIMARY 4 NULL 1 Using index condition; Rowid-ordered scan; Using filesort
1 SIMPLE t3 range PRIMARY PRIMARY 4 NULL 1 Using where; Using filesort
# SELECT * FROM tbl_name WHERE <non-indexed vcol expr> ORDER BY <non-vcol>
select * from t3 where b between -2 and -1 order by a;
a b c
@ -188,7 +189,7 @@ a b c
2 -2 -2
explain select * from t3 where c between -2 and -1 order by a;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t3 range c c 5 NULL 1 Using index condition; Rowid-ordered scan; Using filesort
1 SIMPLE t3 range c c 5 NULL 1 Using where; Using filesort
# SELECT * FROM tbl_name WHERE <non-indexed vcol expr> ORDER BY <non-indexed vcol>
select * from t3 where b between -2 and -1 order by b;
a b c
@ -204,7 +205,7 @@ a b c
1 -1 -1
explain select * from t3 where c between -2 and -1 order by b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t3 range c c 5 NULL 1 Using index condition; Rowid-ordered scan; Using filesort
1 SIMPLE t3 range c c 5 NULL 1 Using where; Using filesort
# SELECT * FROM tbl_name WHERE <non-indexed vcol expr> ORDER BY <indexed vcol>
select * from t3 where b between -2 and -1 order by c;
a b c
@ -220,7 +221,7 @@ a b c
1 -1 -1
explain select * from t3 where c between -2 and -1 order by c;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t3 range c c 5 NULL 1 Using index condition
1 SIMPLE t3 range c c 5 NULL 1 Using where
# SELECT sum(<non-indexed vcol>) FROM tbl_name GROUP BY <non-indexed vcol>
select sum(b) from t1 group by b;
sum(b)

View file

@ -151,6 +151,9 @@ create table t2 (c int, d int, v int as (d+1), index idx(c));
insert into t2(c,d) values
(20, 100), (20, 300), (30, 100), (30, 200), (40, 500),
(70, 100), (40, 300), (60, 100), (40, 100), (70, 100);
insert into t2(c,d) values
(120, 100), (150, 300), (130, 100), (130, 200), (140, 500),
(170, 100), (180, 300), (160, 100), (40, 100), (170, 100);
set join_cache_level=6;
explain