diff options
author | Sergei Golubchik <sergii@pisem.net> | 2011-07-18 23:04:24 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2011-07-18 23:04:24 +0200 |
commit | 4e46d8e5bff140f2549841167dc4b65a3c0a645d (patch) | |
tree | c6612dcc1d0fbd801c084e6c36307d9e5913a293 /mysql-test | |
parent | 9a02c69f5c6766eaf552284a2a4dd0f1d26ecd2c (diff) | |
parent | d4d7a8fa62c406be73f6c0f6d75e795293db548b (diff) | |
download | mariadb-git-4e46d8e5bff140f2549841167dc4b65a3c0a645d.tar.gz |
merge with xtradb-5.5.15
fix test cases
Diffstat (limited to 'mysql-test')
222 files changed, 2435 insertions, 3811 deletions
diff --git a/mysql-test/include/have_innodb.opt b/mysql-test/include/have_innodb.opt index 5d9121b3dc3..4fb96229a7b 100644 --- a/mysql-test/include/have_innodb.opt +++ b/mysql-test/include/have_innodb.opt @@ -1,2 +1,2 @@ --loose-innodb ---plugin-load=$HA_INNODB_SO +--plugin-load=$HA_XTRADB_SO diff --git a/mysql-test/include/have_xtradb.inc b/mysql-test/include/have_xtradb.inc index 5832267375c..cf92b0317df 100644 --- a/mysql-test/include/have_xtradb.inc +++ b/mysql-test/include/have_xtradb.inc @@ -1,3 +1,4 @@ +--source include/have_innodb.inc if (!`SELECT count(*) FROM information_schema.plugins WHERE plugin_name = 'innodb' AND plugin_status = 'active' AND plugin_description LIKE '%xtradb%'`){ diff --git a/mysql-test/include/mix1.inc b/mysql-test/include/mix1.inc index c5995987914..4614535c188 100644 --- a/mysql-test/include/mix1.inc +++ b/mysql-test/include/mix1.inc @@ -1120,6 +1120,11 @@ INSERT INTO t1 (a,b,c) VALUES (1,1,1), (2,1,1), (3,1,1), (4,1,1); INSERT INTO t1 (a,b,c) SELECT a+4,b,c FROM t1; # should be range access + +# +# InnoDB uses "where", while xtradb "index condition" +# +--replace_regex /where/index condition/ EXPLAIN SELECT a, b, c FROM t1 WHERE b = 1 ORDER BY a DESC LIMIT 5; # should produce '8 7 6 5 4' for a diff --git a/mysql-test/include/mysqld--help.inc b/mysql-test/include/mysqld--help.inc index a39615d6011..91fe9bf00e3 100644 --- a/mysql-test/include/mysqld--help.inc +++ b/mysql-test/include/mysqld--help.inc @@ -22,7 +22,7 @@ perl; # Plugins which may or may not be there: @plugins=qw/innodb ndb archive blackhole federated partition ndbcluster debug temp-pool ssl des-key-file - thread-concurrency super-large-pages mutex-deadlock-detector null-audit maria aria pbxt oqgraph sphinx/; + xtradb thread-concurrency super-large-pages mutex-deadlock-detector null-audit maria aria pbxt oqgraph sphinx/; # And substitute the content some environment variables with their # names: @@ -39,7 +39,7 @@ perl; next if /Value \(after reading options\)/; # skip table header next if /^($re1) /; next if /^($re2)-/; - $skip=0 if /^ -/; + $skip=0 if /^ -/ or /^$/; $skip=1 if / --($re2)\b/; y!\\!/!; s/[ ]+/ /; # squeeze spaces to remove table formatting diff --git a/mysql-test/include/percona_query_cache_with_comments.inc b/mysql-test/include/percona_query_cache_with_comments.inc deleted file mode 100644 index bed87bd4c22..00000000000 --- a/mysql-test/include/percona_query_cache_with_comments.inc +++ /dev/null @@ -1,95 +0,0 @@ ---source include/percona_query_cache_with_comments_clear.inc -let $query=/* with comment first */select * from t1; -eval $query; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=# with comment first -select * from t1; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=-- with comment first -select * from t1; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=/* with comment first and "quote" */select * from t1; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=# with comment first and "quote" -select * from t1; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=-- with comment first and "quote" -select * from t1; ---source include/percona_query_cache_with_comments_eval.inc - -let $query= - /* with comment and whitespaces first */select * from t1; ---source include/percona_query_cache_with_comments_eval.inc - -let $query= - # with comment and whitespaces first -select * from t1; ---source include/percona_query_cache_with_comments_eval.inc - -let $query= - -- with comment and whitespaces first -select * from t1; ---source include/percona_query_cache_with_comments_eval.inc - -let $internal=* internal comment *; - -let $query=select * /$internal/ from t1; ---source include/percona_query_cache_with_comments_eval.inc -let $query=select */$internal/ from t1; ---source include/percona_query_cache_with_comments_eval.inc -let $query=select */$internal/from t1; ---source include/percona_query_cache_with_comments_eval.inc - -let $internal=* internal comment with "quote" *; - -let $query=select * /$internal/ from t1; ---source include/percona_query_cache_with_comments_eval.inc -let $query=select */$internal/ from t1; ---source include/percona_query_cache_with_comments_eval.inc -let $query=select */$internal/from t1; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=select * from t1 -; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=select * from t1 ; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=select * from t1 ; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=select * from t1 -/* comment in the end */; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=select * from t1 -/* *\/ */; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=select * from t1 -/* comment in the end */ -; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=select * from t1 #comment in the end; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=select * from t1 #comment in the end -; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=select * from t1 -- comment in the end; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=select * from t1 -- comment in the end -; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=select ' \' ' from t1; ---source include/percona_query_cache_with_comments_eval.inc diff --git a/mysql-test/include/percona_query_response_time_sleep.inc b/mysql-test/include/percona_query_response_time_sleep.inc deleted file mode 100644 index 40688b173b0..00000000000 --- a/mysql-test/include/percona_query_response_time_sleep.inc +++ /dev/null @@ -1,19 +0,0 @@ -SELECT SLEEP(0.31); -SELECT SLEEP(0.32); -SELECT SLEEP(0.33); -SELECT SLEEP(0.34); -SELECT SLEEP(0.35); -SELECT SLEEP(0.36); -SELECT SLEEP(0.37); -SELECT SLEEP(0.38); -SELECT SLEEP(0.39); -SELECT SLEEP(0.40); -SELECT SLEEP(1.1); -SELECT SLEEP(1.2); -SELECT SLEEP(1.3); -SELECT SLEEP(1.5); -SELECT SLEEP(1.4); -SELECT SLEEP(0.5); -SELECT SLEEP(2.1); -SELECT SLEEP(2.3); -SELECT SLEEP(2.5); diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result index c9bac8be27f..2eedac79d25 100644 --- a/mysql-test/r/information_schema.result +++ b/mysql-test/r/information_schema.result @@ -862,7 +862,7 @@ x_double_precision NULL NULL drop table t1; grant select on test.* to mysqltest_4@localhost; SELECT TABLE_NAME, COLUMN_NAME, PRIVILEGES FROM INFORMATION_SCHEMA.COLUMNS -where COLUMN_NAME='TABLE_NAME'; +where COLUMN_NAME='TABLE_NAME' and table_name not like 'innodb%'; TABLE_NAME COLUMN_NAME PRIVILEGES COLUMNS TABLE_NAME select COLUMN_PRIVILEGES TABLE_NAME select @@ -1250,12 +1250,12 @@ f1() DROP FUNCTION f1; DROP PROCEDURE p1; DROP USER mysql_bug20230@localhost; -SELECT MAX(table_name) FROM information_schema.tables WHERE table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test'); +SELECT MAX(table_name) FROM information_schema.tables WHERE table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test') and table_name not like 'xtradb%'; MAX(table_name) VIEWS SELECT table_name from information_schema.tables WHERE table_name=(SELECT MAX(table_name) -FROM information_schema.tables WHERE table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test')); +FROM information_schema.tables WHERE table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test') and table_name not like 'xtradb%'); table_name VIEWS DROP TABLE IF EXISTS bug23037; diff --git a/mysql-test/r/information_schema_all_engines.result b/mysql-test/r/information_schema_all_engines.result index 7a2c548a329..013d480c8e1 100644 --- a/mysql-test/r/information_schema_all_engines.result +++ b/mysql-test/r/information_schema_all_engines.result @@ -15,6 +15,7 @@ GLOBAL_VARIABLES INDEX_STATISTICS KEY_CACHES KEY_COLUMN_USAGE +PARAMETERS PARTITIONS PLUGINS PROCESSLIST @@ -27,6 +28,7 @@ SESSION_STATUS SESSION_VARIABLES STATISTICS TABLES +TABLESPACES TABLE_CONSTRAINTS TABLE_PRIVILEGES TABLE_STATISTICS @@ -34,25 +36,29 @@ TRIGGERS USER_PRIVILEGES USER_STATISTICS VIEWS -INNODB_BUFFER_POOL_PAGES +INNODB_CMPMEM_RESET PBXT_STATISTICS -INNODB_CMP +INNODB_CMPMEM INNODB_RSEG -XTRADB_ENHANCEMENTS -INNODB_BUFFER_POOL_PAGES_INDEX -XTRADB_ADMIN_COMMAND -INNODB_TRX -INNODB_SYS_TABLES +INNODB_SYS_TABLESTATS INNODB_LOCK_WAITS -INNODB_SYS_STATS +INNODB_INDEX_STATS +INNODB_CMP +INNODB_SYS_FOREIGN_COLS +INNODB_CMP_RESET +INNODB_BUFFER_POOL_PAGES +INNODB_TRX +INNODB_BUFFER_POOL_PAGES_INDEX INNODB_LOCKS -INNODB_CMPMEM +INNODB_BUFFER_POOL_PAGES_BLOB +INNODB_SYS_TABLES +INNODB_SYS_FIELDS +INNODB_SYS_COLUMNS INNODB_TABLE_STATS +INNODB_SYS_STATS +INNODB_SYS_FOREIGN INNODB_SYS_INDEXES -INNODB_CMP_RESET -INNODB_BUFFER_POOL_PAGES_BLOB -INNODB_CMPMEM_RESET -INNODB_INDEX_STATS +XTRADB_ADMIN_COMMAND SELECT t.table_name, c1.column_name FROM information_schema.tables t INNER JOIN @@ -82,6 +88,7 @@ GLOBAL_VARIABLES VARIABLE_NAME INDEX_STATISTICS TABLE_SCHEMA KEY_CACHES KEY_CACHE_NAME KEY_COLUMN_USAGE CONSTRAINT_SCHEMA +PARAMETERS SPECIFIC_SCHEMA PARTITIONS TABLE_SCHEMA PLUGINS PLUGIN_NAME PROCESSLIST ID @@ -94,6 +101,7 @@ SESSION_STATUS VARIABLE_NAME SESSION_VARIABLES VARIABLE_NAME STATISTICS TABLE_SCHEMA TABLES TABLE_SCHEMA +TABLESPACES TABLESPACE_NAME TABLE_CONSTRAINTS CONSTRAINT_SCHEMA TABLE_PRIVILEGES TABLE_SCHEMA TABLE_STATISTICS TABLE_SCHEMA @@ -101,25 +109,29 @@ TRIGGERS TRIGGER_SCHEMA USER_PRIVILEGES GRANTEE USER_STATISTICS USER VIEWS TABLE_SCHEMA -INNODB_BUFFER_POOL_PAGES page_type +INNODB_CMPMEM_RESET page_size PBXT_STATISTICS ID -INNODB_CMP page_size +INNODB_CMPMEM page_size INNODB_RSEG rseg_id -XTRADB_ENHANCEMENTS name -INNODB_BUFFER_POOL_PAGES_INDEX index_id -XTRADB_ADMIN_COMMAND result_message -INNODB_TRX trx_id -INNODB_SYS_TABLES SCHEMA +INNODB_SYS_TABLESTATS SCHEMA INNODB_LOCK_WAITS requesting_trx_id -INNODB_SYS_STATS INDEX_ID -INNODB_LOCKS lock_id -INNODB_CMPMEM page_size -INNODB_TABLE_STATS table_schema -INNODB_SYS_INDEXES TABLE_ID +INNODB_INDEX_STATS table_schema +INNODB_CMP page_size +INNODB_SYS_FOREIGN_COLS ID INNODB_CMP_RESET page_size +INNODB_BUFFER_POOL_PAGES page_type +INNODB_TRX trx_id +INNODB_BUFFER_POOL_PAGES_INDEX index_id +INNODB_LOCKS lock_id INNODB_BUFFER_POOL_PAGES_BLOB space_id -INNODB_CMPMEM_RESET page_size -INNODB_INDEX_STATS table_schema +INNODB_SYS_TABLES SCHEMA +INNODB_SYS_FIELDS INDEX_ID +INNODB_SYS_COLUMNS TABLE_ID +INNODB_TABLE_STATS table_schema +INNODB_SYS_STATS INDEX_ID +INNODB_SYS_FOREIGN ID +INNODB_SYS_INDEXES INDEX_ID +XTRADB_ADMIN_COMMAND result_message SELECT t.table_name, c1.column_name FROM information_schema.tables t INNER JOIN @@ -149,6 +161,7 @@ GLOBAL_VARIABLES VARIABLE_NAME INDEX_STATISTICS TABLE_SCHEMA KEY_CACHES KEY_CACHE_NAME KEY_COLUMN_USAGE CONSTRAINT_SCHEMA +PARAMETERS SPECIFIC_SCHEMA PARTITIONS TABLE_SCHEMA PLUGINS PLUGIN_NAME PROCESSLIST ID @@ -161,6 +174,7 @@ SESSION_STATUS VARIABLE_NAME SESSION_VARIABLES VARIABLE_NAME STATISTICS TABLE_SCHEMA TABLES TABLE_SCHEMA +TABLESPACES TABLESPACE_NAME TABLE_CONSTRAINTS CONSTRAINT_SCHEMA TABLE_PRIVILEGES TABLE_SCHEMA TABLE_STATISTICS TABLE_SCHEMA @@ -168,25 +182,29 @@ TRIGGERS TRIGGER_SCHEMA USER_PRIVILEGES GRANTEE USER_STATISTICS USER VIEWS TABLE_SCHEMA -INNODB_BUFFER_POOL_PAGES page_type +INNODB_CMPMEM_RESET page_size PBXT_STATISTICS ID -INNODB_CMP page_size +INNODB_CMPMEM page_size INNODB_RSEG rseg_id -XTRADB_ENHANCEMENTS name -INNODB_BUFFER_POOL_PAGES_INDEX index_id -XTRADB_ADMIN_COMMAND result_message -INNODB_TRX trx_id -INNODB_SYS_TABLES SCHEMA +INNODB_SYS_TABLESTATS SCHEMA INNODB_LOCK_WAITS requesting_trx_id -INNODB_SYS_STATS INDEX_ID -INNODB_LOCKS lock_id -INNODB_CMPMEM page_size -INNODB_TABLE_STATS table_schema -INNODB_SYS_INDEXES TABLE_ID +INNODB_INDEX_STATS table_schema +INNODB_CMP page_size +INNODB_SYS_FOREIGN_COLS ID INNODB_CMP_RESET page_size +INNODB_BUFFER_POOL_PAGES page_type +INNODB_TRX trx_id +INNODB_BUFFER_POOL_PAGES_INDEX index_id +INNODB_LOCKS lock_id INNODB_BUFFER_POOL_PAGES_BLOB space_id -INNODB_CMPMEM_RESET page_size -INNODB_INDEX_STATS table_schema +INNODB_SYS_TABLES SCHEMA +INNODB_SYS_FIELDS INDEX_ID +INNODB_SYS_COLUMNS TABLE_ID +INNODB_TABLE_STATS table_schema +INNODB_SYS_STATS INDEX_ID +INNODB_SYS_FOREIGN ID +INNODB_SYS_INDEXES INDEX_ID +XTRADB_ADMIN_COMMAND result_message select 1 as f1 from information_schema.tables where "CHARACTER_SETS"= (select cast(table_name as char) from information_schema.tables order by table_name limit 1) limit 1; @@ -231,13 +249,19 @@ INNODB_INDEX_STATS information_schema.INNODB_INDEX_STATS 1 INNODB_LOCKS information_schema.INNODB_LOCKS 1 INNODB_LOCK_WAITS information_schema.INNODB_LOCK_WAITS 1 INNODB_RSEG information_schema.INNODB_RSEG 1 +INNODB_SYS_COLUMNS information_schema.INNODB_SYS_COLUMNS 1 +INNODB_SYS_FIELDS information_schema.INNODB_SYS_FIELDS 1 +INNODB_SYS_FOREIGN information_schema.INNODB_SYS_FOREIGN 1 +INNODB_SYS_FOREIGN_COLS information_schema.INNODB_SYS_FOREIGN_COLS 1 INNODB_SYS_INDEXES information_schema.INNODB_SYS_INDEXES 1 INNODB_SYS_STATS information_schema.INNODB_SYS_STATS 1 INNODB_SYS_TABLES information_schema.INNODB_SYS_TABLES 1 +INNODB_SYS_TABLESTATS information_schema.INNODB_SYS_TABLESTATS 1 INNODB_TABLE_STATS information_schema.INNODB_TABLE_STATS 1 INNODB_TRX information_schema.INNODB_TRX 1 KEY_CACHES information_schema.KEY_CACHES 1 KEY_COLUMN_USAGE information_schema.KEY_COLUMN_USAGE 1 +PARAMETERS information_schema.PARAMETERS 1 PARTITIONS information_schema.PARTITIONS 1 PBXT_STATISTICS information_schema.PBXT_STATISTICS 1 PLUGINS information_schema.PLUGINS 1 @@ -251,6 +275,7 @@ SESSION_STATUS information_schema.SESSION_STATUS 1 SESSION_VARIABLES information_schema.SESSION_VARIABLES 1 STATISTICS information_schema.STATISTICS 1 TABLES information_schema.TABLES 1 +TABLESPACES information_schema.TABLESPACES 1 TABLE_CONSTRAINTS information_schema.TABLE_CONSTRAINTS 1 TABLE_PRIVILEGES information_schema.TABLE_PRIVILEGES 1 TABLE_STATISTICS information_schema.TABLE_STATISTICS 1 @@ -258,7 +283,6 @@ TRIGGERS information_schema.TRIGGERS 1 USER_PRIVILEGES information_schema.USER_PRIVILEGES 1 USER_STATISTICS information_schema.USER_STATISTICS 1 VIEWS information_schema.VIEWS 1 -XTRADB_ENHANCEMENTS information_schema.XTRADB_ENHANCEMENTS 1 Database: information_schema +---------------------------------------+ | Tables | @@ -277,6 +301,7 @@ Database: information_schema | INDEX_STATISTICS | | KEY_CACHES | | KEY_COLUMN_USAGE | +| PARAMETERS | | PARTITIONS | | PLUGINS | | PROCESSLIST | @@ -289,6 +314,7 @@ Database: information_schema | SESSION_VARIABLES | | STATISTICS | | TABLES | +| TABLESPACES | | TABLE_CONSTRAINTS | | TABLE_PRIVILEGES | | TABLE_STATISTICS | @@ -296,25 +322,29 @@ Database: information_schema | USER_PRIVILEGES | | USER_STATISTICS | | VIEWS | -| INNODB_BUFFER_POOL_PAGES | +| INNODB_CMPMEM_RESET | | PBXT_STATISTICS | -| INNODB_CMP | +| INNODB_CMPMEM | | INNODB_RSEG | -| XTRADB_ENHANCEMENTS | -| INNODB_BUFFER_POOL_PAGES_INDEX | -| XTRADB_ADMIN_COMMAND | -| INNODB_TRX | -| INNODB_SYS_TABLES | +| INNODB_SYS_TABLESTATS | | INNODB_LOCK_WAITS | -| INNODB_SYS_STATS | +| INNODB_INDEX_STATS | +| INNODB_CMP | +| INNODB_SYS_FOREIGN_COLS | +| INNODB_CMP_RESET | +| INNODB_BUFFER_POOL_PAGES | +| INNODB_TRX | +| INNODB_BUFFER_POOL_PAGES_INDEX | | INNODB_LOCKS | -| INNODB_CMPMEM | +| INNODB_BUFFER_POOL_PAGES_BLOB | +| INNODB_SYS_TABLES | +| INNODB_SYS_FIELDS | +| INNODB_SYS_COLUMNS | | INNODB_TABLE_STATS | +| INNODB_SYS_STATS | +| INNODB_SYS_FOREIGN | | INNODB_SYS_INDEXES | -| INNODB_CMP_RESET | -| INNODB_BUFFER_POOL_PAGES_BLOB | -| INNODB_CMPMEM_RESET | -| INNODB_INDEX_STATS | +| XTRADB_ADMIN_COMMAND | +---------------------------------------+ Database: INFORMATION_SCHEMA +---------------------------------------+ @@ -334,6 +364,7 @@ Database: INFORMATION_SCHEMA | INDEX_STATISTICS | | KEY_CACHES | | KEY_COLUMN_USAGE | +| PARAMETERS | | PARTITIONS | | PLUGINS | | PROCESSLIST | @@ -346,6 +377,7 @@ Database: INFORMATION_SCHEMA | SESSION_VARIABLES | | STATISTICS | | TABLES | +| TABLESPACES | | TABLE_CONSTRAINTS | | TABLE_PRIVILEGES | | TABLE_STATISTICS | @@ -353,25 +385,29 @@ Database: INFORMATION_SCHEMA | USER_PRIVILEGES | | USER_STATISTICS | | VIEWS | -| INNODB_BUFFER_POOL_PAGES | +| INNODB_CMPMEM_RESET | | PBXT_STATISTICS | -| INNODB_CMP | +| INNODB_CMPMEM | | INNODB_RSEG | -| XTRADB_ENHANCEMENTS | -| INNODB_BUFFER_POOL_PAGES_INDEX | -| XTRADB_ADMIN_COMMAND | -| INNODB_TRX | -| INNODB_SYS_TABLES | +| INNODB_SYS_TABLESTATS | | INNODB_LOCK_WAITS | -| INNODB_SYS_STATS | +| INNODB_INDEX_STATS | +| INNODB_CMP | +| INNODB_SYS_FOREIGN_COLS | +| INNODB_CMP_RESET | +| INNODB_BUFFER_POOL_PAGES | +| INNODB_TRX | +| INNODB_BUFFER_POOL_PAGES_INDEX | | INNODB_LOCKS | -| INNODB_CMPMEM | +| INNODB_BUFFER_POOL_PAGES_BLOB | +| INNODB_SYS_TABLES | +| INNODB_SYS_FIELDS | +| INNODB_SYS_COLUMNS | | INNODB_TABLE_STATS | +| INNODB_SYS_STATS | +| INNODB_SYS_FOREIGN | | INNODB_SYS_INDEXES | -| INNODB_CMP_RESET | -| INNODB_BUFFER_POOL_PAGES_BLOB | -| INNODB_CMPMEM_RESET | -| INNODB_INDEX_STATS | +| XTRADB_ADMIN_COMMAND | +---------------------------------------+ Wildcard: inf_rmation_schema +--------------------+ @@ -381,5 +417,5 @@ Wildcard: inf_rmation_schema +--------------------+ SELECT table_schema, count(*) FROM information_schema.TABLES WHERE table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test', 'mysqltest') AND table_name<>'ndb_binlog_index' AND table_name<>'ndb_apply_status' GROUP BY TABLE_SCHEMA; table_schema count(*) -information_schema 52 -mysql 22 +information_schema 58 +mysql 23 diff --git a/mysql-test/r/innodb-analyze.result b/mysql-test/r/innodb-analyze.result deleted file mode 100644 index 2aee004a2d6..00000000000 --- a/mysql-test/r/innodb-analyze.result +++ /dev/null @@ -1,2 +0,0 @@ -Variable_name Value -innodb_stats_sample_pages 1 diff --git a/mysql-test/r/innodb-consistent.result b/mysql-test/r/innodb-consistent.result deleted file mode 100644 index 9115791b99c..00000000000 --- a/mysql-test/r/innodb-consistent.result +++ /dev/null @@ -1,35 +0,0 @@ -drop table if exists t1; -set session transaction isolation level read committed; -create table t1(a int not null) engine=innodb DEFAULT CHARSET=latin1; -create table t2 like t1; -insert into t2 values (1),(2),(3),(4),(5),(6),(7); -set autocommit=0; -begin; -replace into t1 select * from t2; -set session transaction isolation level read committed; -set autocommit=0; -delete from t2 where a=5; -commit; -delete from t2; -commit; -commit; -begin; -insert into t1 select * from t2; -set session transaction isolation level read committed; -set autocommit=0; -delete from t2 where a=5; -commit; -delete from t2; -commit; -commit; -select * from t1; -a -1 -2 -3 -4 -5 -6 -7 -drop table t1; -drop table t2; diff --git a/mysql-test/r/innodb-index_ucs2.result b/mysql-test/r/innodb-index_ucs2.result deleted file mode 100644 index c8a1e8c7da1..00000000000 --- a/mysql-test/r/innodb-index_ucs2.result +++ /dev/null @@ -1,116 +0,0 @@ -create table t1(a int not null, b int, c char(10), d varchar(20), primary key (a)) engine = innodb default charset=ucs2; -insert into t1 values (1,1,'ab','ab'),(2,2,'ac','ac'),(3,2,'ad','ad'),(4,4,'afe','afe'); -commit; -alter table t1 add unique index (b); -ERROR 23000: Duplicate entry '2' for key 'b' -insert into t1 values(8,9,'fff','fff'); -select * from t1; -a b c d -1 1 ab ab -2 2 ac ac -3 2 ad ad -4 4 afe afe -8 9 fff fff -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL, - `b` int(11) DEFAULT NULL, - `c` char(10) DEFAULT NULL, - `d` varchar(20) DEFAULT NULL, - PRIMARY KEY (`a`) -) ENGINE=InnoDB DEFAULT CHARSET=ucs2 -alter table t1 add index (b); -insert into t1 values(10,10,'kkk','iii'); -select * from t1; -a b c d -1 1 ab ab -2 2 ac ac -3 2 ad ad -4 4 afe afe -8 9 fff fff -10 10 kkk iii -select * from t1 force index(b) order by b; -a b c d -1 1 ab ab -2 2 ac ac -3 2 ad ad -4 4 afe afe -8 9 fff fff -10 10 kkk iii -explain select * from t1 force index(b) order by b; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL b 5 NULL 6 -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL, - `b` int(11) DEFAULT NULL, - `c` char(10) DEFAULT NULL, - `d` varchar(20) DEFAULT NULL, - PRIMARY KEY (`a`), - KEY `b` (`b`) -) ENGINE=InnoDB DEFAULT CHARSET=ucs2 -alter table t1 add unique index (c), add index (d); -insert into t1 values(11,11,'aaa','mmm'); -select * from t1; -a b c d -1 1 ab ab -2 2 ac ac -3 2 ad ad -4 4 afe afe -8 9 fff fff -10 10 kkk iii -11 11 aaa mmm -select * from t1 force index(b) order by b; -a b c d -1 1 ab ab -2 2 ac ac -3 2 ad ad -4 4 afe afe -8 9 fff fff -10 10 kkk iii -11 11 aaa mmm -select * from t1 force index(c) order by c; -a b c d -11 11 aaa mmm -1 1 ab ab -2 2 ac ac -3 2 ad ad -4 4 afe afe -8 9 fff fff -10 10 kkk iii -select * from t1 force index(d) order by d; -a b c d -1 1 ab ab -2 2 ac ac -3 2 ad ad -4 4 afe afe -8 9 fff fff -10 10 kkk iii -11 11 aaa mmm -explain select * from t1 force index(b) order by b; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL b 5 NULL 7 -explain select * from t1 force index(c) order by c; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL c 21 NULL 7 -explain select * from t1 force index(d) order by d; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL d 43 NULL 7 -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL, - `b` int(11) DEFAULT NULL, - `c` char(10) DEFAULT NULL, - `d` varchar(20) DEFAULT NULL, - PRIMARY KEY (`a`), - UNIQUE KEY `c` (`c`), - KEY `b` (`b`), - KEY `d` (`d`) -) ENGINE=InnoDB DEFAULT CHARSET=ucs2 -check table t1; -Table Op Msg_type Msg_text -test.t1 check status OK -drop table t1; diff --git a/mysql-test/r/innodb-replace.result b/mysql-test/r/innodb-replace.result deleted file mode 100644 index c926bb89a2e..00000000000 --- a/mysql-test/r/innodb-replace.result +++ /dev/null @@ -1,13 +0,0 @@ -drop table if exists t1; -create table t1 (c1 char(5) unique not null, c2 int, stamp timestamp) engine=innodb; -select * from t1; -c1 c2 stamp -replace delayed into t1 (c1, c2) values ( "text1","11"); -ERROR HY000: DELAYED option not supported for table 't1' -select * from t1; -c1 c2 stamp -replace delayed into t1 (c1, c2) values ( "text1","12"); -ERROR HY000: DELAYED option not supported for table 't1' -select * from t1; -c1 c2 stamp -drop table t1; diff --git a/mysql-test/r/innodb-timeout.result b/mysql-test/r/innodb-timeout.result deleted file mode 100644 index 2d34cdb1cda..00000000000 --- a/mysql-test/r/innodb-timeout.result +++ /dev/null @@ -1,46 +0,0 @@ -set global innodb_lock_wait_timeout=42; -select @@innodb_lock_wait_timeout; -@@innodb_lock_wait_timeout -42 -set innodb_lock_wait_timeout=1; -select @@innodb_lock_wait_timeout; -@@innodb_lock_wait_timeout -1 -select @@innodb_lock_wait_timeout; -@@innodb_lock_wait_timeout -42 -set global innodb_lock_wait_timeout=347; -select @@innodb_lock_wait_timeout; -@@innodb_lock_wait_timeout -42 -set innodb_lock_wait_timeout=1; -select @@innodb_lock_wait_timeout; -@@innodb_lock_wait_timeout -1 -select @@innodb_lock_wait_timeout; -@@innodb_lock_wait_timeout -347 -create table t1(a int primary key)engine=innodb; -begin; -insert into t1 values(1),(2),(3); -set innodb_lock_wait_timeout=5; -select * from t1 for update; -commit; -a -1 -2 -3 -begin; -insert into t1 values(4); -set innodb_lock_wait_timeout=2; -set @a= current_timestamp(); -select * from t1 for update; -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -set @b= current_timestamp(); -set @c= timestampdiff(SECOND, @a, @b); -select if(@c >= 1 and @c <= 10, 'OK', concat("NOT OK, time passed=", @c)); -if(@c >= 1 and @c <= 10, 'OK', concat("NOT OK, time passed=", @c)) -OK -commit; -drop table t1; -set global innodb_lock_wait_timeout=50; diff --git a/mysql-test/r/innodb_bug34053.result b/mysql-test/r/innodb_bug34053.result deleted file mode 100644 index 195775f74c8..00000000000 --- a/mysql-test/r/innodb_bug34053.result +++ /dev/null @@ -1 +0,0 @@ -SET storage_engine=InnoDB; diff --git a/mysql-test/r/innodb_bug34300.result b/mysql-test/r/innodb_bug34300.result deleted file mode 100644 index ae9fee81ad7..00000000000 --- a/mysql-test/r/innodb_bug34300.result +++ /dev/null @@ -1,4 +0,0 @@ -f4 f8 -xxx zzz -f4 f8 -xxx zzz diff --git a/mysql-test/r/innodb_bug35220.result b/mysql-test/r/innodb_bug35220.result deleted file mode 100644 index 195775f74c8..00000000000 --- a/mysql-test/r/innodb_bug35220.result +++ /dev/null @@ -1 +0,0 @@ -SET storage_engine=InnoDB; diff --git a/mysql-test/r/innodb_bug36169.result b/mysql-test/r/innodb_bug36169.result deleted file mode 100644 index aa80e4d7aa4..00000000000 --- a/mysql-test/r/innodb_bug36169.result +++ /dev/null @@ -1,2 +0,0 @@ -SET GLOBAL innodb_file_format='Barracuda'; -SET GLOBAL innodb_file_per_table=ON; diff --git a/mysql-test/r/innodb_bug40360.result b/mysql-test/r/innodb_bug40360.result deleted file mode 100644 index ef4cf463903..00000000000 --- a/mysql-test/r/innodb_bug40360.result +++ /dev/null @@ -1,4 +0,0 @@ -SET TX_ISOLATION='READ-COMMITTED'; -CREATE TABLE bug40360 (a INT) engine=innodb; -INSERT INTO bug40360 VALUES (1); -DROP TABLE bug40360; diff --git a/mysql-test/r/innodb_bug41904.result b/mysql-test/r/innodb_bug41904.result deleted file mode 100644 index 6070d32d181..00000000000 --- a/mysql-test/r/innodb_bug41904.result +++ /dev/null @@ -1,4 +0,0 @@ -CREATE TABLE bug41904 (id INT PRIMARY KEY, uniquecol CHAR(15)) ENGINE=InnoDB; -INSERT INTO bug41904 VALUES (1,NULL), (2,NULL); -CREATE UNIQUE INDEX ui ON bug41904 (uniquecol); -DROP TABLE bug41904; diff --git a/mysql-test/r/innodb_bug44571.result b/mysql-test/r/innodb_bug44571.result deleted file mode 100644 index 955b55ac673..00000000000 --- a/mysql-test/r/innodb_bug44571.result +++ /dev/null @@ -1,7 +0,0 @@ -CREATE TABLE bug44571 (foo INT) ENGINE=InnoDB; -ALTER TABLE bug44571 CHANGE foo bar INT; -ALTER TABLE bug44571 ADD INDEX bug44571b (foo); -ERROR 42000: Key column 'foo' doesn't exist in table -ALTER TABLE bug44571 ADD INDEX bug44571b (bar); -CREATE INDEX bug44571c ON bug44571 (bar); -DROP TABLE bug44571; diff --git a/mysql-test/r/innodb_bug46676.result b/mysql-test/r/innodb_bug46676.result deleted file mode 100644 index 996799ce931..00000000000 --- a/mysql-test/r/innodb_bug46676.result +++ /dev/null @@ -1,9 +0,0 @@ -SET foreign_key_checks=0; -CREATE TABLE t1 (id int, foreign key (id) references t2(id)) ENGINE=INNODB; -CREATE TABLE t2 (id int, foreign key (id) references t1(id)) ENGINE=INNODB; -SET foreign_key_checks=1; -SELECT COUNT(*) FROM information_schema.key_column_usage WHERE REFERENCED_TABLE_NAME in ('t1', 't2'); -COUNT(*) -2 -SET foreign_key_checks=0; -DROP TABLE t1, t2; diff --git a/mysql-test/r/innodb_information_schema.result b/mysql-test/r/innodb_information_schema.result deleted file mode 100644 index 396cae579ce..00000000000 --- a/mysql-test/r/innodb_information_schema.result +++ /dev/null @@ -1,23 +0,0 @@ -lock_mode lock_type lock_table lock_index lock_rec lock_data -X RECORD `test`.```t'\"_str` `PRIMARY` 2 '1', 'abc', '''abc', 'abc''', 'a''bc', 'a''bc''', '''abc''''' -X RECORD `test`.```t'\"_str` `PRIMARY` 2 '1', 'abc', '''abc', 'abc''', 'a''bc', 'a''bc''', '''abc''''' -X RECORD `test`.```t'\"_str` `PRIMARY` 3 '2', 'abc', '"abc', 'abc"', 'a"bc', 'a"bc"', '"abc""' -X RECORD `test`.```t'\"_str` `PRIMARY` 3 '2', 'abc', '"abc', 'abc"', 'a"bc', 'a"bc"', '"abc""' -X RECORD `test`.```t'\"_str` `PRIMARY` 4 '3', 'abc', '\\abc', 'abc\\', 'a\\bc', 'a\\bc\\', '\\abc\\\\' -X RECORD `test`.```t'\"_str` `PRIMARY` 4 '3', 'abc', '\\abc', 'abc\\', 'a\\bc', 'a\\bc\\', '\\abc\\\\' -X RECORD `test`.```t'\"_str` `PRIMARY` 5 '4', 'abc', '\0abc', 'abc\0', 'a\0bc', 'a\0bc\0', 'a\0bc\0\0' -X RECORD `test`.```t'\"_str` `PRIMARY` 5 '4', 'abc', '\0abc', 'abc\0', 'a\0bc', 'a\0bc\0', 'a\0bc\0\0' -X RECORD `test`.`t_min` `PRIMARY` 2 -128, 0, -32768, 0, -8388608, 0, -2147483648, 0, -9223372036854775808, 0 -X RECORD `test`.`t_min` `PRIMARY` 2 -128, 0, -32768, 0, -8388608, 0, -2147483648, 0, -9223372036854775808, 0 -X RECORD `test`.`t_max` `PRIMARY` 2 127, 255, 32767, 65535, 8388607, 16777215, 2147483647, 4294967295, 9223372036854775807, 18446744073709551615 -X RECORD `test`.`t_max` `PRIMARY` 2 127, 255, 32767, 65535, 8388607, 16777215, 2147483647, 4294967295, 9223372036854775807, 18446744073709551615 -X RECORD `test`.```t'\"_str` `PRIMARY` 1 supremum pseudo-record -X RECORD `test`.```t'\"_str` `PRIMARY` 1 supremum pseudo-record -lock_table COUNT(*) -`test`.`t_max` 2 -`test`.`t_min` 2 -`test`.```t'\"_str` 10 -lock_table COUNT(*) -"test"."t_max" 2 -"test"."t_min" 2 -"test"."`t'\""_str" 10 diff --git a/mysql-test/r/innodb_trx_weight.result b/mysql-test/r/innodb_trx_weight.result deleted file mode 100644 index 195775f74c8..00000000000 --- a/mysql-test/r/innodb_trx_weight.result +++ /dev/null @@ -1 +0,0 @@ -SET storage_engine=InnoDB; diff --git a/mysql-test/suite/innodb/r/innodb_mysql.result b/mysql-test/suite/innodb/r/innodb_mysql.result index 5b1c0a8b611..deb84a87e93 100644 --- a/mysql-test/suite/innodb/r/innodb_mysql.result +++ b/mysql-test/suite/innodb/r/innodb_mysql.result @@ -1375,7 +1375,7 @@ INSERT INTO t1 (a,b,c) VALUES (1,1,1), (2,1,1), (3,1,1), (4,1,1); INSERT INTO t1 (a,b,c) SELECT a+4,b,c FROM t1; EXPLAIN SELECT a, b, c FROM t1 WHERE b = 1 ORDER BY a DESC LIMIT 5; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range t1_b t1_b 5 NULL 8 Using where +1 SIMPLE t1 range t1_b t1_b 5 NULL 8 Using index condition SELECT a, b, c FROM t1 WHERE b = 1 ORDER BY a DESC LIMIT 5; a b c 8 1 1 diff --git a/mysql-test/suite/pbxt/r/mysqlshow.result b/mysql-test/suite/pbxt/r/mysqlshow.result index 4898da69b98..96e45e84b77 100644 --- a/mysql-test/suite/pbxt/r/mysqlshow.result +++ b/mysql-test/suite/pbxt/r/mysqlshow.result @@ -114,7 +114,29 @@ Database: information_schema | USER_PRIVILEGES | | USER_STATISTICS | | VIEWS | +| INNODB_CMPMEM_RESET | | PBXT_STATISTICS | +| INNODB_CMPMEM | +| INNODB_RSEG | +| INNODB_SYS_TABLESTATS | +| INNODB_LOCK_WAITS | +| INNODB_INDEX_STATS | +| INNODB_CMP | +| INNODB_SYS_FOREIGN_COLS | +| INNODB_CMP_RESET | +| INNODB_BUFFER_POOL_PAGES | +| INNODB_TRX | +| INNODB_BUFFER_POOL_PAGES_INDEX | +| INNODB_LOCKS | +| INNODB_BUFFER_POOL_PAGES_BLOB | +| INNODB_SYS_TABLES | +| INNODB_SYS_FIELDS | +| INNODB_SYS_COLUMNS | +| INNODB_TABLE_STATS | +| INNODB_SYS_STATS | +| INNODB_SYS_FOREIGN | +| INNODB_SYS_INDEXES | +| XTRADB_ADMIN_COMMAND | +---------------------------------------+ Database: INFORMATION_SCHEMA +---------------------------------------+ @@ -155,7 +177,29 @@ Database: INFORMATION_SCHEMA | USER_PRIVILEGES | | USER_STATISTICS | | VIEWS | +| INNODB_CMPMEM_RESET | | PBXT_STATISTICS | +| INNODB_CMPMEM | +| INNODB_RSEG | +| INNODB_SYS_TABLESTATS | +| INNODB_LOCK_WAITS | +| INNODB_INDEX_STATS | +| INNODB_CMP | +| INNODB_SYS_FOREIGN_COLS | +| INNODB_CMP_RESET | +| INNODB_BUFFER_POOL_PAGES | +| INNODB_TRX | +| INNODB_BUFFER_POOL_PAGES_INDEX | +| INNODB_LOCKS | +| INNODB_BUFFER_POOL_PAGES_BLOB | +| INNODB_SYS_TABLES | +| INNODB_SYS_FIELDS | +| INNODB_SYS_COLUMNS | +| INNODB_TABLE_STATS | +| INNODB_SYS_STATS | +| INNODB_SYS_FOREIGN | +| INNODB_SYS_INDEXES | +| XTRADB_ADMIN_COMMAND | +---------------------------------------+ Wildcard: inf_rmation_schema +--------------------+ diff --git a/mysql-test/suite/pbxt/t/mysqlshow.test b/mysql-test/suite/pbxt/t/mysqlshow.test index d8f5c20afcd..41505cc0b10 100644 --- a/mysql-test/suite/pbxt/t/mysqlshow.test +++ b/mysql-test/suite/pbxt/t/mysqlshow.test @@ -1,5 +1,6 @@ # Can't run test of external client with embedded server -- source include/not_embedded.inc +-- source include/have_innodb.inc --disable_warnings DROP TABLE IF EXISTS t1,t2,test1,test2; diff --git a/mysql-test/suite/percona/disabled.def b/mysql-test/suite/percona/disabled.def index a99b952a5eb..c20f5f3860d 100644 --- a/mysql-test/suite/percona/disabled.def +++ b/mysql-test/suite/percona/disabled.def @@ -16,7 +16,23 @@ percona_status_wait_query_cache_mutex: Feature not merged into MariaDB percona_slave_innodb_stats: Feature not merged into MariaDB percona_query_response_time-replication: Feature not merged into MariaDB percona_server_variables: Feature not merged into MariaDB - percona_slow_query_log-log_slow_verbosity: InnoDB filtering information not fully merged into MariaDB - percona_innodb_buffer_pool_shm: Requires big shmmax not default on many systems +percona_log_warnings_suppress: Feature not merged into MariaDB +percona_slow_extended-log_slow_sp_statements-cl: Feature not merged into MariaDB +percona_slow_extended-log_slow_verbosity-cl: Feature not merged into MariaDB +slow_query_log_use_global_control: Feature not merged into MariaDB +percona_slow_extended-use_global_control: Feature not merged into MariaDB +percona_slow_query_log-log_slow_verbosity: Feature not merged into MariaDB +percona_slow_extended-log_slow_verbosity: Feature not merged into MariaDB +percona_slow_extended-microseconds_in_slow_extended: Feature not merged into MariaDB +percona_slow_extended-use_global_long_query_time: Feature not merged into MariaDB +percona_slow_extended-slow_query_log_timestamp_always-cl: Feature not merged into MariaDB +percona_slow_extended-slow_query_log_microseconds_timestamp-cl: Feature not merged into MariaDB +percona_bug643149: Feature not merged into MariaDB +percona_processlist_row_stats: Feature not merged into MariaDB +percona_server_variables_debug: Feature not merged into MariaDB +percona_slow_extended-slave_statements: Feature not merged into MariaDB +percona_show_slave_status_nolock: Feature not merged into MariaDB +percona_slow_extended-slave_innodb_stats: Feature not merged into MariaDB +percona_slow_extended-slave_statements-and-use_global_long_query_time: Feature not merged into MariaDB diff --git a/mysql-test/suite/percona/grep.inc b/mysql-test/suite/percona/grep.inc new file mode 100644 index 00000000000..c9c823fa695 --- /dev/null +++ b/mysql-test/suite/percona/grep.inc @@ -0,0 +1,16 @@ +perl; + + $file = $ENV{'grep_file'}; + $pattern = $ENV{'grep_pattern'}; + + open(FILE, "$file") + or die("Cannot open file $file: $!\n"); + + $lines = 0; + while(<FILE>) { + $lines++ if (/$pattern/); + } + print "$lines\n"; + + close(FILE); +EOF diff --git a/mysql-test/suite/percona/have_response_time_distribution.inc b/mysql-test/suite/percona/have_response_time_distribution.inc new file mode 100644 index 00000000000..45650133b31 --- /dev/null +++ b/mysql-test/suite/percona/have_response_time_distribution.inc @@ -0,0 +1,4 @@ +if (`SELECT @@have_response_time_distribution != 'YES'`) +{ + --skip No response time distribution +} diff --git a/mysql-test/suite/percona/percona_bug643149.result b/mysql-test/suite/percona/percona_bug643149.result new file mode 100644 index 00000000000..1a447a194e7 --- /dev/null +++ b/mysql-test/suite/percona/percona_bug643149.result @@ -0,0 +1,21 @@ +SET @old_slow_query_log_file=@@global.slow_query_log_file; +SET GLOBAL slow_query_log=on; +SET LOCAL log_slow_verbosity='profiling'; +SET LOCAL long_query_time=0; +SET GLOBAL slow_query_log_file='MYSQLTEST_VARDIR/percona_bug643149_slow.log';; +SELECT 1; +1 +1 +# User@Host: root[root] @ localhost [] +# Thread_id: X Schema: test Last_errno: X Killed: X +# Query_time: X.X Lock_time: X.X Rows_sent: X Rows_examined: X Rows_affected: X Rows_read: X +# Bytes_sent: X Tmp_tables: X Tmp_disk_tables: X Tmp_table_sizes: X +# Profile_starting: X.X Profile_starting_cpu: X.X Profile_Opening_tables: X.X Profile_Opening_tables_cpu: X.X Profile_query_end: X.X Profile_query_end_cpu: X.X Profile_closing_tables: X.X Profile_closing_tables_cpu: X.X Profile_freeing_items: X.X Profile_freeing_items_cpu: X.X Profile_logging_slow_query: X.X Profile_logging_slow_query_cpu: X.X +# Profile_total: X.X Profile_total_cpu: X.X +# User@Host: root[root] @ localhost [] +# Thread_id: X Schema: test Last_errno: X Killed: X +# Query_time: X.X Lock_time: X.X Rows_sent: X Rows_examined: X Rows_affected: X Rows_read: X +# Bytes_sent: X Tmp_tables: X Tmp_disk_tables: X Tmp_table_sizes: X +# Profile_starting: X.X Profile_starting_cpu: X.X Profile_checking_permissions: X.X Profile_checking_permissions_cpu: X.X Profile_Opening_tables: X.X Profile_Opening_tables_cpu: X.X Profile_init: X.X Profile_init_cpu: X.X Profile_optimizing: X.X Profile_optimizing_cpu: X.X Profile_executing: X.X Profile_executing_cpu: X.X Profile_end: X.X Profile_end_cpu: X.X Profile_query_end: X.X Profile_query_end_cpu: X.X Profile_closing_tables: X.X Profile_closing_tables_cpu: X.X Profile_freeing_items: X.X Profile_freeing_items_cpu: X.X Profile_logging_slow_query: X.X Profile_logging_slow_query_cpu: X.X +# Profile_total: X.X Profile_total_cpu: X.X +SET GLOBAL slow_query_log_file=@old_slow_query_log_file; diff --git a/mysql-test/suite/percona/percona_bug643149.test b/mysql-test/suite/percona/percona_bug643149.test new file mode 100644 index 00000000000..fa31b169a19 --- /dev/null +++ b/mysql-test/suite/percona/percona_bug643149.test @@ -0,0 +1,49 @@ +# +# This test suffers from server +# Bug#38124 "general_log_file" variable silently unset when using expression +# In short: +# SET GLOBAL general_log_file = @<whatever> +# SET GLOBAL slow_query_log = @<whatever> +# cause that the value of these server system variables is set to default +# instead of the assigned values. There comes no error message or warning. +# If this bug is fixed please +# 1. try this test with "let $fixed_bug38124 = 0;" +# 2. remove all workarounds if 1. was successful. +--source include/have_profiling.inc +let $fixed_bug38124 = 0; + +SET @old_slow_query_log_file=@@global.slow_query_log_file; +SET GLOBAL slow_query_log=on; +SET LOCAL log_slow_verbosity='profiling'; +SET LOCAL long_query_time=0; + +let slogfile=$MYSQLTEST_VARDIR/percona_bug643149_slow.log; +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--eval SET GLOBAL slow_query_log_file='$slogfile'; + +SELECT 1; + +perl; + $slogfile= $ENV{'slogfile'}; + + open(FILE, "$slogfile") or + die("Unable to read slow query log file $slogfile: $!\n"); + while(<FILE>) { + next if (!/^#/); + next if (/^# Time:/); + s/[0-9]+/X/g; + print; + } + + close(FILE); +EOF + +SET GLOBAL slow_query_log_file=@old_slow_query_log_file; + +if(!$fixed_bug38124) +{ + --disable_query_log + let $my_var = `SELECT @old_slow_query_log_file`; + eval SET @@global.slow_query_log_file = '$my_var'; + --enable_query_log +} diff --git a/mysql-test/suite/percona/percona_innodb_buffer_pool_shm.result b/mysql-test/suite/percona/percona_innodb_buffer_pool_shm.result index 08ece8fb9a9..e5373606099 100644 --- a/mysql-test/suite/percona/percona_innodb_buffer_pool_shm.result +++ b/mysql-test/suite/percona/percona_innodb_buffer_pool_shm.result @@ -1,6 +1,4 @@ show variables like 'innodb_buffer_pool_shm%'; Variable_name Value -innodb_buffer_pool_shm_key 123456 -show variables like 'innodb_buffer_pool_shm%'; -Variable_name Value +innodb_buffer_pool_shm_checksum ON innodb_buffer_pool_shm_key 123456 diff --git a/mysql-test/suite/percona/percona_innodb_buffer_pool_shm.test b/mysql-test/suite/percona/percona_innodb_buffer_pool_shm.test index 7b81bb8d54b..7b26c217893 100644 --- a/mysql-test/suite/percona/percona_innodb_buffer_pool_shm.test +++ b/mysql-test/suite/percona/percona_innodb_buffer_pool_shm.test @@ -1,18 +1,2 @@ ---source include/have_innodb.inc +--source include/have_xtradb.inc show variables like 'innodb_buffer_pool_shm%'; - -#clean shutdown (restart_mysqld.inc is not clean if over 10 sec...) ---write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect -wait -EOF -shutdown_server 120; ---append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect -restart -EOF ---enable_reconnect ---source include/wait_until_connected_again.inc ---disable_reconnect - -show variables like 'innodb_buffer_pool_shm%'; ---sleep 1 ---system ipcrm -M 123456 diff --git a/mysql-test/suite/percona/percona_innodb_deadlock_count.result b/mysql-test/suite/percona/percona_innodb_deadlock_count.result index 4ad6fd433fe..00902e87feb 100644 --- a/mysql-test/suite/percona/percona_innodb_deadlock_count.result +++ b/mysql-test/suite/percona/percona_innodb_deadlock_count.result @@ -11,18 +11,18 @@ insert into t values(1,2); # Switch to connection con1 BEGIN; SELECT b FROM t WHERE a=1 FOR UPDATE; -b -2 # Switch to connection con2 BEGIN; SELECT b FROM t WHERE a=2 FOR UPDATE; -b -1 # Switch to connection con1 SELECT b FROM t WHERE a=2 FOR UPDATE; # Switch to connection con2 SELECT b FROM t WHERE a=1 FOR UPDATE; +# Switch to connection con1 +ROLLBACK; +# Switch to connection con2 +ROLLBACK; # Switch to connection con3 -1 +Deadlocks: 1 # Drop test table drop table t; diff --git a/mysql-test/suite/percona/percona_innodb_deadlock_count.test b/mysql-test/suite/percona/percona_innodb_deadlock_count.test index 7a7f0e5ddb7..f953b9d7822 100644 --- a/mysql-test/suite/percona/percona_innodb_deadlock_count.test +++ b/mysql-test/suite/percona/percona_innodb_deadlock_count.test @@ -9,7 +9,6 @@ connect (con3,localhost,root,,); --disable_warnings drop table if exists t; --enable_warnings -disable_abort_on_error; --echo # Create test table create table t(a INT PRIMARY KEY, b INT) engine=InnoDB; @@ -20,12 +19,12 @@ insert into t values(1,2); #--echo # Save current deadlock count let $current = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'Innodb_deadlocks'`; +--disable_result_log + --echo # Switch to connection con1 connection con1; BEGIN; SELECT b FROM t WHERE a=1 FOR UPDATE; -#show engine innodb status; - --echo # Switch to connection con2 connection con2; BEGIN; SELECT b FROM t WHERE a=2 FOR UPDATE; @@ -38,12 +37,25 @@ SEND SELECT b FROM t WHERE a=2 FOR UPDATE; connection con2; SEND SELECT b FROM t WHERE a=1 FOR UPDATE; -SLEEP 0.2; +--echo # Switch to connection con1 +connection con1; +--error 0, ER_LOCK_DEADLOCK +reap; +ROLLBACK; + +--echo # Switch to connection con2 +connection con2; +--error 0, ER_LOCK_DEADLOCK +reap; +ROLLBACK; + --echo # Switch to connection con3 connection con3; let $result = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'Innodb_deadlocks'`; +--enable_result_log + let $diff = `SELECT $result - $current`; -echo $diff; +echo Deadlocks: $diff; --echo # Drop test table drop table t; diff --git a/mysql-test/suite/percona/percona_log_connection_error-master.opt b/mysql-test/suite/percona/percona_log_connection_error-master.opt index 32a891789f3..4658d62af60 100644 --- a/mysql-test/suite/percona/percona_log_connection_error-master.opt +++ b/mysql-test/suite/percona/percona_log_connection_error-master.opt @@ -1 +1 @@ ---log-error
\ No newline at end of file +--log-error diff --git a/mysql-test/suite/percona/percona_log_connection_error.test b/mysql-test/suite/percona/percona_log_connection_error.test index 57cd652bd24..677da047354 100644 --- a/mysql-test/suite/percona/percona_log_connection_error.test +++ b/mysql-test/suite/percona/percona_log_connection_error.test @@ -48,5 +48,7 @@ if(!`select LENGTH('$log_error_')`) # Assign env variable LOG_ERROR let LOG_ERROR=$log_error_; -let cmd=cat $log_error | grep "Too many connections" | wc -l; +--let grep_file = $log_error +--let grep_pattern = Too many connections +--source grep.inc exec $cmd; diff --git a/mysql-test/suite/percona/percona_log_slow_slave_statements-and-use_global_long_query_time.test b/mysql-test/suite/percona/percona_log_slow_slave_statements-and-use_global_long_query_time.test deleted file mode 100644 index 8d4bb1e091c..00000000000 --- a/mysql-test/suite/percona/percona_log_slow_slave_statements-and-use_global_long_query_time.test +++ /dev/null @@ -1,141 +0,0 @@ --- source include/not_windows.inc - --- echo # Activate master-slave replication --- source include/master-slave.inc - -connection master; --- echo # Make table t for test --- disable_warnings -DROP TABLE IF EXISTS t; --- enable_warnings -CREATE TABLE t(id INT); - - --- echo # Start slave replication --- disable_warnings -connection slave; -START SLAVE; --- source include/wait_for_slave_to_start.inc --- enable_warnings - -#-- echo # Make insert(1) on master -connection master; -INSERT INTO t VALUES (1); --- echo # Read information about master binlog -let $binlog_file = query_get_value(SHOW MASTER STATUS,File,1); -let $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1); - --- echo # Sync(1) slave thread -connection slave; -let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`; - --- echo # Read and change log_slow_slave_statements to ON on slave -show variables like 'log_slow_slave_statements'; -set global log_slow_slave_statements=ON; -show variables like 'log_slow_slave_statements'; - -#-- echo # Make insert(2) on master -connection master; -INSERT INTO t VALUES (2); --- echo # Read information about master binlog -let $binlog_file = query_get_value(SHOW MASTER STATUS,File,1); -let $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1); - --- echo # Sync slave(2) thread -connection slave; -let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`; --- echo # Restart slave -STOP SLAVE; --- source include/wait_for_slave_to_stop.inc -START SLAVE; --- source include/wait_for_slave_to_start.inc - -#-- echo # Make insert(3) on master -connection master; -INSERT INTO t VALUES (3); --- echo # Read information about master binlog -let $binlog_file = query_get_value(SHOW MASTER STATUS,File,1); -let $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1); - --- echo # Sync(3) slave thread -connection slave; -let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`; -show variables like 'long_query_time'; -show global variables like 'long_query_time'; -show global variables like 'use_global_long_query_time'; -set global long_query_time=0; -show variables like 'long_query_time'; -show global variables like 'long_query_time'; -show global variables like 'use_global_long_query_time'; - -#-- echo # Make insert(4) on master -connection master; -INSERT INTO t VALUES (4); --- echo # Read information about master binlog -let $binlog_file = query_get_value(SHOW MASTER STATUS,File,1); -let $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1); - --- echo # Sync slave(4) thread -connection slave; -let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`; -show variables like 'long_query_time'; -show global variables like 'long_query_time'; -show global variables like 'use_global_long_query_time'; -set global use_global_long_query_time=1; -show variables like 'long_query_time'; -show global variables like 'long_query_time'; -show global variables like 'use_global_long_query_time'; - -#-- echo # Make insert(5) on master -connection master; -let $MASTER_DATADIR= `select @@datadir`; -INSERT INTO t VALUES (5); --- echo # Read information about master binlog -let $binlog_file = query_get_value(SHOW MASTER STATUS,File,1); -let $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1); - --- echo # Sync slave(5) thread -connection slave; -let $SLAVE_DATADIR= `select @@datadir`; -let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`; -show variables like 'long_query_time'; -show global variables like 'long_query_time'; -show global variables like 'use_global_long_query_time'; -set global long_query_time=1; -set global use_global_long_query_time=0; - --- echo # Analyse master slow_query_log -let $i=5; -let $k=1; -let $cmd=cat ./$MASTER_DATADIR/percona_log_slow_slave_statements-master.log | grep; -while($i) -{ - let $current_cmd = $cmd "INSERT INTO t VALUES ($k)" | wc -l; - exec $current_cmd; - dec $i; - inc $k; -} - --- echo # Analyse slave slow_query_log -let $i=5; -let $k=1; -let $cmd=cat $SLAVE_DATADIR/percona_log_slow_slave_statements-slave.log | grep; -while($i) -{ - let $current_cmd = $cmd "INSERT INTO t VALUES ($k)" | wc -l; - exec $current_cmd; - dec $i; - inc $k; -} -set global log_slow_slave_statements=OFF; - -connection master; -DROP TABLE t; - --- echo # Read information about master binlog -let $binlog_file = query_get_value(SHOW MASTER STATUS,File,1); -let $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1); - --- echo # Sync slave(6) thread -connection slave; -let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`; diff --git a/mysql-test/suite/percona/percona_log_slow_slave_statements.result b/mysql-test/suite/percona/percona_log_slow_slave_statements.result deleted file mode 100644 index e3bf3e92c94..00000000000 --- a/mysql-test/suite/percona/percona_log_slow_slave_statements.result +++ /dev/null @@ -1,86 +0,0 @@ -# Activate master-slave replication -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -# Make table t for test -DROP TABLE IF EXISTS t; -CREATE TABLE t(id INT); -# Start slave replication -START SLAVE; -INSERT INTO t VALUES (1); -# Read information about master binlog -# Sync(1) slave thread -# Read and change log_slow_slave_statements to ON on slave -show variables like 'log_slow_slave_statements'; -Variable_name Value -log_slow_slave_statements OFF -set global log_slow_slave_statements=ON; -show variables like 'log_slow_slave_statements'; -Variable_name Value -log_slow_slave_statements ON -INSERT INTO t VALUES (2); -# Read information about master binlog -# Sync slave(2) thread -# Restart slave -STOP SLAVE; -START SLAVE; -INSERT INTO t VALUES (3); -# Read information about master binlog -# Sync(3) slave thread -# Read and change log_slow_slave_statements to OFF on slave -show variables like 'log_slow_slave_statements'; -Variable_name Value -log_slow_slave_statements ON -set global log_slow_slave_statements=OFF; -show variables like 'log_slow_slave_statements'; -Variable_name Value -log_slow_slave_statements OFF -INSERT INTO t VALUES (4); -# Read information about master binlog -# Sync slave(4) thread -# Restart slave -STOP SLAVE; -START SLAVE; -INSERT INTO t VALUES (5); -# Read information about master binlog -# Sync slave(5) thread -# Read and change log_slow_slave_statements to ON on slave -show variables like 'log_slow_slave_statements'; -Variable_name Value -log_slow_slave_statements OFF -set global log_slow_slave_statements=ON; -show variables like 'log_slow_slave_statements'; -Variable_name Value -log_slow_slave_statements ON -INSERT INTO t VALUES (6); -# Read information about master binlog -# Sync slave(6) thread -# Restart slave -STOP SLAVE; -START SLAVE; -INSERT INTO t VALUES (7); -# Read information about master binlog -# Sync slave(7) thread -# Analyse master slow_query_log -1 -1 -1 -1 -1 -1 -1 -# Analyse slave slow_query_log -0 -0 -1 -0 -0 -0 -1 -set global log_slow_slave_statements=OFF; -DROP TABLE t; -# Read information about master binlog -# Sync slave(8) thread diff --git a/mysql-test/suite/percona/percona_log_slow_slave_statements.test b/mysql-test/suite/percona/percona_log_slow_slave_statements.test deleted file mode 100644 index 8c9c594e41c..00000000000 --- a/mysql-test/suite/percona/percona_log_slow_slave_statements.test +++ /dev/null @@ -1,162 +0,0 @@ --- source include/not_windows.inc - --- echo # Activate master-slave replication --- source include/master-slave.inc - -connection master; --- echo # Make table t for test --- disable_warnings -DROP TABLE IF EXISTS t; --- enable_warnings -CREATE TABLE t(id INT); - - --- echo # Start slave replication --- disable_warnings -connection slave; -START SLAVE; --- source include/wait_for_slave_to_start.inc --- enable_warnings - -#-- echo # Make insert(1) on master -connection master; -INSERT INTO t VALUES (1); --- echo # Read information about master binlog -let $binlog_file = query_get_value(SHOW MASTER STATUS,File,1); -let $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1); - --- echo # Sync(1) slave thread -connection slave; -let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`; - --- echo # Read and change log_slow_slave_statements to ON on slave -show variables like 'log_slow_slave_statements'; -set global log_slow_slave_statements=ON; -show variables like 'log_slow_slave_statements'; - -#-- echo # Make insert(2) on master -connection master; -INSERT INTO t VALUES (2); --- echo # Read information about master binlog -let $binlog_file = query_get_value(SHOW MASTER STATUS,File,1); -let $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1); - --- echo # Sync slave(2) thread -connection slave; -let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`; --- echo # Restart slave -STOP SLAVE; --- source include/wait_for_slave_to_stop.inc -START SLAVE; --- source include/wait_for_slave_to_start.inc - -#-- echo # Make insert(3) on master -connection master; -INSERT INTO t VALUES (3); --- echo # Read information about master binlog -let $binlog_file = query_get_value(SHOW MASTER STATUS,File,1); -let $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1); - --- echo # Sync(3) slave thread -connection slave; -let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`; --- echo # Read and change log_slow_slave_statements to OFF on slave -show variables like 'log_slow_slave_statements'; -set global log_slow_slave_statements=OFF; -show variables like 'log_slow_slave_statements'; - -#-- echo # Make insert(4) on master -connection master; -INSERT INTO t VALUES (4); --- echo # Read information about master binlog -let $binlog_file = query_get_value(SHOW MASTER STATUS,File,1); -let $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1); - --- echo # Sync slave(4) thread -connection slave; -let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`; --- echo # Restart slave -STOP SLAVE; --- source include/wait_for_slave_to_stop.inc -START SLAVE; --- source include/wait_for_slave_to_start.inc - -#-- echo # Make insert(5) on master -connection master; -INSERT INTO t VALUES (5); --- echo # Read information about master binlog -let $binlog_file = query_get_value(SHOW MASTER STATUS,File,1); -let $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1); - --- echo # Sync slave(5) thread -connection slave; -let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`; --- echo # Read and change log_slow_slave_statements to ON on slave -show variables like 'log_slow_slave_statements'; -set global log_slow_slave_statements=ON; -show variables like 'log_slow_slave_statements'; - -#-- echo # Make insert(6) on master -connection master; -INSERT INTO t VALUES (6); --- echo # Read information about master binlog -let $binlog_file = query_get_value(SHOW MASTER STATUS,File,1); -let $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1); - --- echo # Sync slave(6) thread -connection slave; -let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`; --- echo # Restart slave -STOP SLAVE; --- source include/wait_for_slave_to_stop.inc -START SLAVE; --- source include/wait_for_slave_to_start.inc - -#-- echo # Make insert(7) on master -connection master; -let $MASTER_DATADIR= `select @@datadir`; -INSERT INTO t VALUES (7); --- echo # Read information about master binlog -let $binlog_file = query_get_value(SHOW MASTER STATUS,File,1); -let $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1); - --- echo # Sync slave(7) thread -connection slave; -let $SLAVE_DATADIR= `select @@datadir`; -let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`; - --- echo # Analyse master slow_query_log -let $i=7; -let $k=1; -let $cmd=cat $MASTER_DATADIR/percona_log_slow_slave_statements-master.log | grep -c; -while($i) -{ - let $current_cmd = $cmd "INSERT INTO t VALUES ($k)"; - exec $current_cmd; - dec $i; - inc $k; -} - --- echo # Analyse slave slow_query_log -let $i=7; -let $k=1; -let $cmd=cat $SLAVE_DATADIR/percona_log_slow_slave_statements-slave.log | grep -c; -while($i) -{ - let $current_cmd = $cmd "INSERT INTO t VALUES ($k)"; - exec $current_cmd; - dec $i; - inc $k; -} -set global log_slow_slave_statements=OFF; - -connection master; -DROP TABLE t; - --- echo # Read information about master binlog -let $binlog_file = query_get_value(SHOW MASTER STATUS,File,1); -let $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1); - --- echo # Sync slave(8) thread -connection slave; -let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`; diff --git a/mysql-test/suite/percona/percona_suppress_log_warning_1592-master.opt b/mysql-test/suite/percona/percona_log_warnings_suppress-master.opt index 4658d62af60..4658d62af60 100644 --- a/mysql-test/suite/percona/percona_suppress_log_warning_1592-master.opt +++ b/mysql-test/suite/percona/percona_log_warnings_suppress-master.opt diff --git a/mysql-test/suite/percona/percona_log_warnings_suppress.result b/mysql-test/suite/percona/percona_log_warnings_suppress.result new file mode 100644 index 00000000000..1ee6c46738a --- /dev/null +++ b/mysql-test/suite/percona/percona_log_warnings_suppress.result @@ -0,0 +1,31 @@ +SET @old_log_warnings = @@log_warnings; +SET @old_log_warnings_suppress = @@log_warnings_suppress; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (a VARCHAR(36), b VARCHAR(20)); +SET GLOBAL log_warnings_suppress=''; +SET GLOBAL LOG_WARNINGS=0; +SHOW GLOBAL VARIABLES LIKE 'log_warnings_suppress'; +Variable_name Value +log_warnings_suppress +INSERT INTO t1 VALUES(UUID(), 'suppress_1592'); +Warnings: +Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave. +SET GLOBAL LOG_WARNINGS=1; +INSERT INTO t1 VALUES(UUID(), 'suppress_1592'); +Warnings: +Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave. +SET GLOBAL log_warnings_suppress='1592'; +SET GLOBAL LOG_WARNINGS=0; +INSERT INTO t1 VALUES(UUID(), 'suppress_1592'); +Warnings: +Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave. +SET GLOBAL LOG_WARNINGS=1; +INSERT INTO t1 VALUES(UUID(), 'suppress_1592'); +Warnings: +Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave. +DROP TABLE t1; +SET GLOBAL log_warnings = @old_log_warnings; +SET GLOBAL log_warnings_suppress = @old_log_warnings_suppress; +# Count the number of times the "Unsafe" message was printed +# to the error log. +Occurrences: 1 diff --git a/mysql-test/suite/percona/percona_suppress_log_warning_1592.test b/mysql-test/suite/percona/percona_log_warnings_suppress.test index 97fe40469fc..82221013f0b 100644 --- a/mysql-test/suite/percona/percona_suppress_log_warning_1592.test +++ b/mysql-test/suite/percona/percona_log_warnings_suppress.test @@ -2,26 +2,27 @@ -- source include/have_binlog_format_statement.inc SET @old_log_warnings = @@log_warnings; -SET @old_suppress_log_warning_1592 = @@suppress_log_warning_1592; +SET @old_log_warnings_suppress = @@log_warnings_suppress; --disable_warnings DROP TABLE IF EXISTS t1; --enable_warnings CREATE TABLE t1 (a VARCHAR(36), b VARCHAR(20)); -SET GLOBAL SUPPRESS_LOG_WARNING_1592 = 0; -SET GLOBAL LOG_WARNINGS = 0; +SET GLOBAL log_warnings_suppress=''; +SET GLOBAL LOG_WARNINGS=0; +SHOW GLOBAL VARIABLES LIKE 'log_warnings_suppress'; INSERT INTO t1 VALUES(UUID(), 'suppress_1592'); -SET GLOBAL LOG_WARNINGS = 1; +SET GLOBAL LOG_WARNINGS=1; INSERT INTO t1 VALUES(UUID(), 'suppress_1592'); -SET GLOBAL SUPPRESS_LOG_WARNING_1592 = 1; -SET GLOBAL LOG_WARNINGS = 0; +SET GLOBAL log_warnings_suppress='1592'; +SET GLOBAL LOG_WARNINGS=0; INSERT INTO t1 VALUES(UUID(), 'suppress_1592'); -SET GLOBAL LOG_WARNINGS = 1; +SET GLOBAL LOG_WARNINGS=1; INSERT INTO t1 VALUES(UUID(), 'suppress_1592'); DROP TABLE t1; SET GLOBAL log_warnings = @old_log_warnings; -SET GLOBAL suppress_log_warning_1592 = @old_suppress_log_warning_1592; +SET GLOBAL log_warnings_suppress = @old_log_warnings_suppress; let $log_error_= `SELECT @@GLOBAL.log_error`; if(!`select LENGTH('$log_error_')`) diff --git a/mysql-test/suite/percona/percona_processlist_row_stats.result b/mysql-test/suite/percona/percona_processlist_row_stats.result new file mode 100644 index 00000000000..e9b07b2eaea --- /dev/null +++ b/mysql-test/suite/percona/percona_processlist_row_stats.result @@ -0,0 +1,74 @@ +DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t2; +CREATE TABLE t2 (a INT); +INSERT INTO t2 VALUES(10); +INSERT INTO t2 VALUES(10); +INSERT INTO t2 VALUES(20); +INSERT INTO t2 VALUES(10); +INSERT INTO t2 VALUES(20); +Issuing operation that should not return any rows and stopping the thread #1 +SET DEBUG_SYNC= 'locked_table_name SIGNAL thread1_ready WAIT_FOR threads_dumped'; +CREATE TABLE t1 (a INT); +SET DEBUG_SYNC= 'now WAIT_FOR thread1_ready'; +Thread #1 stopped +Issuing row-returning query and stopping the thread #2 at the end of query +SET DEBUG_SYNC= 'execute_command_after_close_tables SIGNAL thread2_ready WAIT_FOR threads_dumped'; +SELECT a FROM t2 WHERE a > 15; +SET DEBUG_SYNC= 'now WAIT_FOR thread2_ready'; +Thread #2 stopped +Look at thread states +SHOW PROCESSLIST; +Id User Host db Command Time State Info Rows_sent Rows_examined Rows_read +### root ### test Query ### ### SHOW PROCESSLIST 0 0 2 +### root ### test Query ### ### CREATE TABLE t1 (a INT) 0 0 1 +### root ### test Query ### ### SELECT a FROM t2 WHERE a > 15 2 5 6 +SELECT id, info, rows_sent, rows_examined, rows_read FROM information_schema.processlist +ORDER BY id; +id info rows_sent rows_examined rows_read +### SELECT id, info, rows_sent, rows_examined, rows_read FROM information_schema.processlist +ORDER BY id 0 0 1 +### CREATE TABLE t1 (a INT) 0 0 1 +### SELECT a FROM t2 WHERE a > 15 2 5 6 +Let threads #1 and #2 finish their job +SET DEBUG_SYNC= 'now SIGNAL threads_dumped'; +a +20 +20 +Issuing row-returning query and stopping the thread #2 in the middle of query +SET DEBUG_SYNC= 'sent_row SIGNAL thread2_ready WAIT_FOR threads_dumped'; +SELECT a FROM t2 WHERE a > 15; +SET DEBUG_SYNC= 'now WAIT_FOR thread2_ready'; +Thread #2 stopped, look at its state +SHOW PROCESSLIST; +Id User Host db Command Time State Info Rows_sent Rows_examined Rows_read +### root ### test Query ### ### SHOW PROCESSLIST 0 0 4 +### root ### test Sleep ### ### NULL 0 0 1 +### root ### test Query ### ### SELECT a FROM t2 WHERE a > 15 1 0 3 +SELECT id,rows_sent,rows_examined,rows_read FROM INFORMATION_SCHEMA.PROCESSLIST ORDER BY Id; +id rows_sent rows_examined rows_read +### 0 0 1 +### 0 0 1 +### 1 0 3 +SET DEBUG_SYNC= 'now SIGNAL threads_dumped'; +Let thread #2 finish its job +a +20 +20 +Issuing an UPDATE and stopping thread #2 +SET DEBUG_SYNC= 'execute_command_after_close_tables SIGNAL thread2_ready WAIT_FOR threads_dumped'; +UPDATE t2 SET a = 15 WHERE a = 10; +SET DEBUG_SYNC= 'now WAIT_FOR thread2_ready'; +Thread #2 stopped, look at its state +SHOW PROCESSLIST; +Id User Host db Command Time State Info Rows_sent Rows_examined Rows_read +### root ### test Query ### ### SHOW PROCESSLIST 0 0 4 +### root ### test Sleep ### ### NULL 0 0 1 +### root ### test Query ### ### UPDATE t2 SET a = 15 WHERE a = 10 0 5 6 +SELECT id,rows_sent,rows_examined,rows_read FROM INFORMATION_SCHEMA.PROCESSLIST ORDER BY Id; +id rows_sent rows_examined rows_read +### 0 0 1 +### 0 0 1 +### 0 5 6 +SET DEBUG_SYNC= 'now SIGNAL threads_dumped'; +Let thread #2 finish its job +DROP TABLES t1, t2; diff --git a/mysql-test/suite/percona/percona_processlist_row_stats.test b/mysql-test/suite/percona/percona_processlist_row_stats.test new file mode 100644 index 00000000000..230a9f4c311 --- /dev/null +++ b/mysql-test/suite/percona/percona_processlist_row_stats.test @@ -0,0 +1,92 @@ +# Testing of INFORMATION_SCHEMA.PROCESSLIST fields ROWS_SENT, ROWS_EXAMINED, ROWS_READ +--source include/have_debug_sync.inc + +--disable_warnings +DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t2; +--enable_warnings + +CREATE TABLE t2 (a INT); +INSERT INTO t2 VALUES(10); +INSERT INTO t2 VALUES(10); +INSERT INTO t2 VALUES(20); +INSERT INTO t2 VALUES(10); +INSERT INTO t2 VALUES(20); + +connect (conn1, localhost, root, ,); +connect (conn2, localhost, root, ,); + +--connection conn1 +echo Issuing operation that should not return any rows and stopping the thread #1; +SET DEBUG_SYNC= 'locked_table_name SIGNAL thread1_ready WAIT_FOR threads_dumped'; +send CREATE TABLE t1 (a INT); + +--connection default +SET DEBUG_SYNC= 'now WAIT_FOR thread1_ready'; +--echo Thread #1 stopped + +--connection conn2 +echo Issuing row-returning query and stopping the thread #2 at the end of query; +SET DEBUG_SYNC= 'execute_command_after_close_tables SIGNAL thread2_ready WAIT_FOR threads_dumped'; +send SELECT a FROM t2 WHERE a > 15; + +--connection default +SET DEBUG_SYNC= 'now WAIT_FOR thread2_ready'; +--echo Thread #2 stopped +--echo Look at thread states + +--replace_column 1 ### 3 ### 6 ### 7 ### +SHOW PROCESSLIST; +# The running threads are different between SHOW above and SELECT below. Thus select info too to +# show the difference. Results are in the same order as in SHOW. +--replace_column 1 ### +SELECT id, info, rows_sent, rows_examined, rows_read FROM information_schema.processlist +ORDER BY id; + +echo Let threads #1 and #2 finish their job; +SET DEBUG_SYNC= 'now SIGNAL threads_dumped'; + +--connection conn1 +reap; + +--connection conn2 +reap; +echo Issuing row-returning query and stopping the thread #2 in the middle of query; +SET DEBUG_SYNC= 'sent_row SIGNAL thread2_ready WAIT_FOR threads_dumped'; +send SELECT a FROM t2 WHERE a > 15; + +--connection default +SET DEBUG_SYNC= 'now WAIT_FOR thread2_ready'; +echo Thread #2 stopped, look at its state; + +--replace_column 1 ### 3 ### 6 ### 7 ### +SHOW PROCESSLIST; +--replace_column 1 ### +SELECT id,rows_sent,rows_examined,rows_read FROM INFORMATION_SCHEMA.PROCESSLIST ORDER BY Id; +SET DEBUG_SYNC= 'now SIGNAL threads_dumped'; +echo Let thread #2 finish its job; + +--connection conn2 +reap; +echo Issuing an UPDATE and stopping thread #2; +SET DEBUG_SYNC= 'execute_command_after_close_tables SIGNAL thread2_ready WAIT_FOR threads_dumped'; +send UPDATE t2 SET a = 15 WHERE a = 10; + +--connection default +SET DEBUG_SYNC= 'now WAIT_FOR thread2_ready'; +echo Thread #2 stopped, look at its state; + +--replace_column 1 ### 3 ### 6 ### 7 ### +SHOW PROCESSLIST; +--replace_column 1 ### +SELECT id,rows_sent,rows_examined,rows_read FROM INFORMATION_SCHEMA.PROCESSLIST ORDER BY Id; +SET DEBUG_SYNC= 'now SIGNAL threads_dumped'; +echo Let thread #2 finish its job; + +--connection conn2 +reap; + +--connection default +disconnect conn1; +disconnect conn2; +DROP TABLES t1, t2; diff --git a/mysql-test/suite/percona/percona_query_cache_with_comments.inc b/mysql-test/suite/percona/percona_query_cache_with_comments.inc new file mode 100644 index 00000000000..d55e52d5b64 --- /dev/null +++ b/mysql-test/suite/percona/percona_query_cache_with_comments.inc @@ -0,0 +1,95 @@ +--source percona_query_cache_with_comments_clear.inc +let $query=/* with comment first */select * from t1; +eval $query; +--source percona_query_cache_with_comments_eval.inc + +let $query=# with comment first +select * from t1; +--source percona_query_cache_with_comments_eval.inc + +let $query=-- with comment first +select * from t1; +--source percona_query_cache_with_comments_eval.inc + +let $query=/* with comment first and "quote" */select * from t1; +--source percona_query_cache_with_comments_eval.inc + +let $query=# with comment first and "quote" +select * from t1; +--source percona_query_cache_with_comments_eval.inc + +let $query=-- with comment first and "quote" +select * from t1; +--source percona_query_cache_with_comments_eval.inc + +let $query= + /* with comment and whitespaces first */select * from t1; +--source percona_query_cache_with_comments_eval.inc + +let $query= + # with comment and whitespaces first +select * from t1; +--source percona_query_cache_with_comments_eval.inc + +let $query= + -- with comment and whitespaces first +select * from t1; +--source percona_query_cache_with_comments_eval.inc + +let $internal=* internal comment *; + +let $query=select * /$internal/ from t1; +--source percona_query_cache_with_comments_eval.inc +let $query=select */$internal/ from t1; +--source percona_query_cache_with_comments_eval.inc +let $query=select */$internal/from t1; +--source percona_query_cache_with_comments_eval.inc + +let $internal=* internal comment with "quote" *; + +let $query=select * /$internal/ from t1; +--source percona_query_cache_with_comments_eval.inc +let $query=select */$internal/ from t1; +--source percona_query_cache_with_comments_eval.inc +let $query=select */$internal/from t1; +--source percona_query_cache_with_comments_eval.inc + +let $query=select * from t1 +; +--source percona_query_cache_with_comments_eval.inc + +let $query=select * from t1 ; +--source percona_query_cache_with_comments_eval.inc + +let $query=select * from t1 ; +--source percona_query_cache_with_comments_eval.inc + +let $query=select * from t1 +/* comment in the end */; +--source percona_query_cache_with_comments_eval.inc + +let $query=select * from t1 +/* *\/ */; +--source percona_query_cache_with_comments_eval.inc + +let $query=select * from t1 +/* comment in the end */ +; +--source percona_query_cache_with_comments_eval.inc + +let $query=select * from t1 #comment in the end; +--source percona_query_cache_with_comments_eval.inc + +let $query=select * from t1 #comment in the end +; +--source percona_query_cache_with_comments_eval.inc + +let $query=select * from t1 -- comment in the end; +--source percona_query_cache_with_comments_eval.inc + +let $query=select * from t1 -- comment in the end +; +--source percona_query_cache_with_comments_eval.inc + +let $query=select ' \' ' from t1; +--source percona_query_cache_with_comments_eval.inc diff --git a/mysql-test/suite/percona/percona_query_cache_with_comments.test b/mysql-test/suite/percona/percona_query_cache_with_comments.test index 0190f54d104..0b93441f364 100644 --- a/mysql-test/suite/percona/percona_query_cache_with_comments.test +++ b/mysql-test/suite/percona/percona_query_cache_with_comments.test @@ -1,3 +1,4 @@ +--disable_ps_protocol set global query_cache_strip_comments=ON; -- source include/percona_query_cache_with_comments_begin.inc -- source include/percona_query_cache_with_comments.inc diff --git a/mysql-test/include/percona_query_cache_with_comments_begin.inc b/mysql-test/suite/percona/percona_query_cache_with_comments_begin.inc index 38bfce20263..6bfd2bfbc83 100644 --- a/mysql-test/include/percona_query_cache_with_comments_begin.inc +++ b/mysql-test/suite/percona/percona_query_cache_with_comments_begin.inc @@ -9,4 +9,4 @@ drop table if exists t1; create table t1 (a int not null); insert into t1 values (1),(2),(3); ---source include/percona_query_cache_with_comments_clear.inc +--source percona_query_cache_with_comments_clear.inc diff --git a/mysql-test/include/percona_query_cache_with_comments_clear.inc b/mysql-test/suite/percona/percona_query_cache_with_comments_clear.inc index 728a19a3c97..728a19a3c97 100644 --- a/mysql-test/include/percona_query_cache_with_comments_clear.inc +++ b/mysql-test/suite/percona/percona_query_cache_with_comments_clear.inc diff --git a/mysql-test/include/percona_query_cache_with_comments_end.inc b/mysql-test/suite/percona/percona_query_cache_with_comments_end.inc index d5356359d7e..d5356359d7e 100644 --- a/mysql-test/include/percona_query_cache_with_comments_end.inc +++ b/mysql-test/suite/percona/percona_query_cache_with_comments_end.inc diff --git a/mysql-test/include/percona_query_cache_with_comments_eval.inc b/mysql-test/suite/percona/percona_query_cache_with_comments_eval.inc index a409786d554..f0c200245e0 100644 --- a/mysql-test/include/percona_query_cache_with_comments_eval.inc +++ b/mysql-test/suite/percona/percona_query_cache_with_comments_eval.inc @@ -1,7 +1,7 @@ echo -----------------------------------------------------; echo $query; echo -----------------------------------------------------; ---source include/percona_query_cache_with_comments_show.inc +--source percona_query_cache_with_comments_show.inc eval $query; eval $query; ---source include/percona_query_cache_with_comments_show.inc +--source percona_query_cache_with_comments_show.inc diff --git a/mysql-test/include/percona_query_cache_with_comments_show.inc b/mysql-test/suite/percona/percona_query_cache_with_comments_show.inc index 71aa5211cfd..71aa5211cfd 100644 --- a/mysql-test/include/percona_query_cache_with_comments_show.inc +++ b/mysql-test/suite/percona/percona_query_cache_with_comments_show.inc diff --git a/mysql-test/suite/percona/percona_query_response_time-replication.result b/mysql-test/suite/percona/percona_query_response_time-replication.result index df5c73812df..fd06d07b4d8 100644 --- a/mysql-test/suite/percona/percona_query_response_time-replication.result +++ b/mysql-test/suite/percona/percona_query_response_time-replication.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP TABLE IF EXISTS t; CREATE TABLE t(id INT); SELECT * from t; @@ -21,12 +17,16 @@ SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; Variable_name Value query_response_time_range_base 10 FLUSH QUERY_RESPONSE_TIME; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=ON; -INSERT INTO t VALUES(0); +SET GLOBAL QUERY_RESPONSE_TIME_STATS=ON; +INSERT INTO t SELECT SLEEP(0.4); +Warnings: +Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave. SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) 0 -INSERT INTO t VALUES(1); +INSERT INTO t SELECT SLEEP(0.4); +Warnings: +Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave. SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) 0 @@ -41,11 +41,15 @@ SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; Variable_name Value query_response_time_range_base 2 FLUSH QUERY_RESPONSE_TIME; -INSERT INTO t VALUES(0); +INSERT INTO t SELECT SLEEP(0.4); +Warnings: +Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave. SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) 0 -INSERT INTO t VALUES(1); +INSERT INTO t SELECT SLEEP(0.4); +Warnings: +Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave. SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) 0 @@ -57,4 +61,6 @@ SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) 3 DROP TABLE IF EXISTS t; SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=OFF; +SET GLOBAL QUERY_RESPONSE_TIME_STATS=OFF; +STOP SLAVE; +include/wait_for_slave_to_stop.inc diff --git a/mysql-test/suite/percona/percona_query_response_time-replication.test b/mysql-test/suite/percona/percona_query_response_time-replication.test index 4f674c2fd19..199ecce0977 100644 --- a/mysql-test/suite/percona/percona_query_response_time-replication.test +++ b/mysql-test/suite/percona/percona_query_response_time-replication.test @@ -1,4 +1,10 @@ +--source include/have_response_time_distribution.inc --source include/master-slave.inc +--source include/have_binlog_format_statement.inc +--source include/have_debug.inc +--disable_query_log +call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave. Statement:"); +--enable_query_log connection master; -- disable_warnings @@ -16,12 +22,12 @@ SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10; SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; source include/percona_query_response_time_flush.inc; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=ON; +SET GLOBAL QUERY_RESPONSE_TIME_STATS=ON; connection master; -INSERT INTO t VALUES(0); +INSERT INTO t SELECT SLEEP(0.4); SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -INSERT INTO t VALUES(1); +INSERT INTO t SELECT SLEEP(0.4); SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; sync_slave_with_master; @@ -34,9 +40,9 @@ SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; source include/percona_query_response_time_flush.inc; connection master; -INSERT INTO t VALUES(0); +INSERT INTO t SELECT SLEEP(0.4); SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -INSERT INTO t VALUES(1); +INSERT INTO t SELECT SLEEP(0.4); SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; sync_slave_with_master; @@ -49,4 +55,7 @@ DROP TABLE IF EXISTS t; sync_slave_with_master; connection slave; SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=OFF; +SET GLOBAL QUERY_RESPONSE_TIME_STATS=OFF; + +STOP SLAVE; +-- source include/wait_for_slave_to_stop.inc diff --git a/mysql-test/suite/percona/percona_query_response_time-stored.result b/mysql-test/suite/percona/percona_query_response_time-stored.result index df51f2bfd58..0168c4630be 100644 --- a/mysql-test/suite/percona/percona_query_response_time-stored.result +++ b/mysql-test/suite/percona/percona_query_response_time-stored.result @@ -1,15 +1,9 @@ +SET GLOBAL debug="d,query_exec_time_debug"; CREATE FUNCTION test_f() RETURNS CHAR(30) DETERMINISTIC BEGIN -DECLARE first VARCHAR(5); -DECLARE second VARCHAR(5); -DECLARE result VARCHAR(20); -SELECT SLEEP(1.11) INTO first; -SET first= 'Hello'; -SET second=', '; -SET result= CONCAT(first,second); -SET result= CONCAT(result,'world!'); -RETURN result; +SET SESSION debug="+d,query_exec_time_1.1"; +RETURN 'Hello, world!'; END/ SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1; Warnings: @@ -78,7 +72,7 @@ time 4194304.00000 8388608.00000 TOO LONG -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; +SET GLOBAL QUERY_RESPONSE_TIME_STATS=1; SELECT test_f(); test_f() Hello, world! @@ -91,7 +85,7 @@ Hello, world! SELECT test_f(); test_f() Hello, world! -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; +SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; SELECT d.count, (SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count, (SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total, @@ -99,8 +93,7 @@ SELECT d.count, (SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0; count query_count query_total not_zero_region_count region_count -1 5 4 2 44 -4 5 4 2 44 +4 4 4 1 44 SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; region_count 44 @@ -158,11 +151,11 @@ SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; Variable_name Value query_response_time_range_base 10 FLUSH QUERY_RESPONSE_TIME; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; +SET GLOBAL QUERY_RESPONSE_TIME_STATS=1; SELECT test_f(); test_f() Hello, world! -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; +SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; SELECT d.count, (SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count, (SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total, @@ -170,8 +163,7 @@ SELECT d.count, (SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0; count query_count query_total not_zero_region_count region_count -1 2 1 2 14 -1 2 1 2 14 +1 1 1 1 14 SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; region_count 14 @@ -199,11 +191,11 @@ SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; Variable_name Value query_response_time_range_base 7 FLUSH QUERY_RESPONSE_TIME; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; +SET GLOBAL QUERY_RESPONSE_TIME_STATS=1; SELECT test_f(); test_f() Hello, world! -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; +SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; SELECT d.count, (SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count, (SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total, @@ -211,8 +203,7 @@ SELECT d.count, (SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0; count query_count query_total not_zero_region_count region_count -1 2 1 2 17 -1 2 1 2 17 +1 1 1 1 17 SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; region_count 17 @@ -243,11 +234,11 @@ SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; Variable_name Value query_response_time_range_base 156 FLUSH QUERY_RESPONSE_TIME; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; +SET GLOBAL QUERY_RESPONSE_TIME_STATS=1; SELECT test_f(); test_f() Hello, world! -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; +SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; SELECT d.count, (SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count, (SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total, @@ -255,8 +246,7 @@ SELECT d.count, (SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0; count query_count query_total not_zero_region_count region_count -1 2 1 2 7 -1 2 1 2 7 +1 1 1 1 7 SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; region_count 7 @@ -277,11 +267,11 @@ SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; Variable_name Value query_response_time_range_base 1000 FLUSH QUERY_RESPONSE_TIME; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; +SET GLOBAL QUERY_RESPONSE_TIME_STATS=1; SELECT test_f(); test_f() Hello, world! -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; +SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; SELECT d.count, (SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count, (SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total, @@ -289,8 +279,7 @@ SELECT d.count, (SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0; count query_count query_total not_zero_region_count region_count -1 2 1 2 6 -1 2 1 2 6 +1 1 1 1 6 SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; region_count 6 @@ -311,6 +300,7 @@ Warning 1292 Truncated incorrect query_response_time_range_base value: '1001' SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; Variable_name Value query_response_time_range_base 1000 -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; +SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE =10; DROP FUNCTION test_f; +SET GLOBAL debug=default; diff --git a/mysql-test/suite/percona/percona_query_response_time-stored.test b/mysql-test/suite/percona/percona_query_response_time-stored.test index f761dd7d01c..e80fc3dd3c0 100644 --- a/mysql-test/suite/percona/percona_query_response_time-stored.test +++ b/mysql-test/suite/percona/percona_query_response_time-stored.test @@ -1,18 +1,14 @@ -source include/have_innodb.inc; +--source include/have_response_time_distribution.inc +--source include/have_debug.inc + +SET GLOBAL debug="d,query_exec_time_debug"; delimiter /; CREATE FUNCTION test_f() RETURNS CHAR(30) DETERMINISTIC BEGIN - DECLARE first VARCHAR(5); - DECLARE second VARCHAR(5); - DECLARE result VARCHAR(20); - SELECT SLEEP(1.11) INTO first; - SET first= 'Hello'; - SET second=', '; - SET result= CONCAT(first,second); - SET result= CONCAT(result,'world!'); - RETURN result; + SET SESSION debug="+d,query_exec_time_1.1"; + RETURN 'Hello, world!'; END/ delimiter ;/ @@ -24,12 +20,12 @@ SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; source include/percona_query_response_time_flush.inc; source include/percona_query_response_time_show.inc; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; +SET GLOBAL QUERY_RESPONSE_TIME_STATS=1; SELECT test_f(); SELECT test_f(); SELECT test_f(); SELECT test_f(); -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; +SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; source include/percona_query_response_time_show.inc; @@ -38,9 +34,9 @@ SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10; SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; source include/percona_query_response_time_flush.inc; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; +SET GLOBAL QUERY_RESPONSE_TIME_STATS=1; SELECT test_f(); -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; +SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; source include/percona_query_response_time_show.inc; @@ -49,9 +45,9 @@ SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 7; SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; source include/percona_query_response_time_flush.inc; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; +SET GLOBAL QUERY_RESPONSE_TIME_STATS=1; SELECT test_f(); -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; +SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; source include/percona_query_response_time_show.inc; @@ -60,9 +56,9 @@ SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 156; SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; source include/percona_query_response_time_flush.inc; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; +SET GLOBAL QUERY_RESPONSE_TIME_STATS=1; SELECT test_f(); -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; +SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; source include/percona_query_response_time_show.inc; @@ -71,9 +67,9 @@ SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1000; SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; source include/percona_query_response_time_flush.inc; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; +SET GLOBAL QUERY_RESPONSE_TIME_STATS=1; SELECT test_f(); -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; +SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; source include/percona_query_response_time_show.inc; @@ -81,7 +77,9 @@ SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1001; SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; +SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE =10; -DROP FUNCTION test_f;
\ No newline at end of file +DROP FUNCTION test_f; + +SET GLOBAL debug=default; diff --git a/mysql-test/suite/percona/percona_query_response_time.result b/mysql-test/suite/percona/percona_query_response_time.result index 54657b6ca06..2243c155e39 100644 --- a/mysql-test/suite/percona/percona_query_response_time.result +++ b/mysql-test/suite/percona/percona_query_response_time.result @@ -1,3 +1,4 @@ +SET GLOBAL debug="d,query_exec_time_debug"; SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1; Warnings: Warning 1292 Truncated incorrect query_response_time_range_base value: '1' @@ -65,65 +66,27 @@ time 4194304.00000 8388608.00000 TOO LONG -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; -SELECT SLEEP(0.31); -SLEEP(0.31) -0 -SELECT SLEEP(0.32); -SLEEP(0.32) -0 -SELECT SLEEP(0.33); -SLEEP(0.33) -0 -SELECT SLEEP(0.34); -SLEEP(0.34) -0 -SELECT SLEEP(0.35); -SLEEP(0.35) -0 -SELECT SLEEP(0.36); -SLEEP(0.36) -0 -SELECT SLEEP(0.37); -SLEEP(0.37) -0 -SELECT SLEEP(0.38); -SLEEP(0.38) -0 -SELECT SLEEP(0.39); -SLEEP(0.39) -0 -SELECT SLEEP(0.40); -SLEEP(0.40) -0 -SELECT SLEEP(1.1); -SLEEP(1.1) -0 -SELECT SLEEP(1.2); -SLEEP(1.2) -0 -SELECT SLEEP(1.3); -SLEEP(1.3) -0 -SELECT SLEEP(1.5); -SLEEP(1.5) -0 -SELECT SLEEP(1.4); -SLEEP(1.4) -0 -SELECT SLEEP(0.5); -SLEEP(0.5) -0 -SELECT SLEEP(2.1); -SLEEP(2.1) -0 -SELECT SLEEP(2.3); -SLEEP(2.3) -0 -SELECT SLEEP(2.5); -SLEEP(2.5) -0 -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; +SET GLOBAL QUERY_RESPONSE_TIME_STATS=1; +SET SESSION debug="+d,query_exec_time_0.31"; +SET SESSION debug="+d,query_exec_time_0.32"; +SET SESSION debug="+d,query_exec_time_0.33"; +SET SESSION debug="+d,query_exec_time_0.34"; +SET SESSION debug="+d,query_exec_time_0.35"; +SET SESSION debug="+d,query_exec_time_0.36"; +SET SESSION debug="+d,query_exec_time_0.37"; +SET SESSION debug="+d,query_exec_time_0.38"; +SET SESSION debug="+d,query_exec_time_0.39"; +SET SESSION debug="+d,query_exec_time_0.4"; +SET SESSION debug="+d,query_exec_time_1.1"; +SET SESSION debug="+d,query_exec_time_1.2"; +SET SESSION debug="+d,query_exec_time_1.3"; +SET SESSION debug="+d,query_exec_time_1.5"; +SET SESSION debug="+d,query_exec_time_1.4"; +SET SESSION debug="+d,query_exec_time_0.5"; +SET SESSION debug="+d,query_exec_time_2.1"; +SET SESSION debug="+d,query_exec_time_2.3"; +SET SESSION debug="+d,query_exec_time_2.5"; +SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; SELECT d.count, (SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count, (SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total, @@ -131,11 +94,10 @@ SELECT d.count, (SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0; count query_count query_total not_zero_region_count region_count -1 20 15 5 44 -10 20 15 5 44 -1 20 15 5 44 -5 20 15 5 44 -3 20 15 5 44 +10 19 15 4 44 +1 19 15 4 44 +5 19 15 4 44 +3 19 15 4 44 SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; region_count 44 @@ -193,65 +155,27 @@ SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; Variable_name Value query_response_time_range_base 10 FLUSH QUERY_RESPONSE_TIME; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; -SELECT SLEEP(0.31); -SLEEP(0.31) -0 -SELECT SLEEP(0.32); -SLEEP(0.32) -0 -SELECT SLEEP(0.33); -SLEEP(0.33) -0 -SELECT SLEEP(0.34); -SLEEP(0.34) -0 -SELECT SLEEP(0.35); -SLEEP(0.35) -0 -SELECT SLEEP(0.36); -SLEEP(0.36) -0 -SELECT SLEEP(0.37); -SLEEP(0.37) -0 -SELECT SLEEP(0.38); -SLEEP(0.38) -0 -SELECT SLEEP(0.39); -SLEEP(0.39) -0 -SELECT SLEEP(0.40); -SLEEP(0.40) -0 -SELECT SLEEP(1.1); -SLEEP(1.1) -0 -SELECT SLEEP(1.2); -SLEEP(1.2) -0 -SELECT SLEEP(1.3); -SLEEP(1.3) -0 -SELECT SLEEP(1.5); -SLEEP(1.5) -0 -SELECT SLEEP(1.4); -SLEEP(1.4) -0 -SELECT SLEEP(0.5); -SLEEP(0.5) -0 -SELECT SLEEP(2.1); -SLEEP(2.1) -0 -SELECT SLEEP(2.3); -SLEEP(2.3) -0 -SELECT SLEEP(2.5); -SLEEP(2.5) -0 -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; +SET GLOBAL QUERY_RESPONSE_TIME_STATS=1; +SET SESSION debug="+d,query_exec_time_0.31"; +SET SESSION debug="+d,query_exec_time_0.32"; +SET SESSION debug="+d,query_exec_time_0.33"; +SET SESSION debug="+d,query_exec_time_0.34"; +SET SESSION debug="+d,query_exec_time_0.35"; +SET SESSION debug="+d,query_exec_time_0.36"; +SET SESSION debug="+d,query_exec_time_0.37"; +SET SESSION debug="+d,query_exec_time_0.38"; +SET SESSION debug="+d,query_exec_time_0.39"; +SET SESSION debug="+d,query_exec_time_0.4"; +SET SESSION debug="+d,query_exec_time_1.1"; +SET SESSION debug="+d,query_exec_time_1.2"; +SET SESSION debug="+d,query_exec_time_1.3"; +SET SESSION debug="+d,query_exec_time_1.5"; +SET SESSION debug="+d,query_exec_time_1.4"; +SET SESSION debug="+d,query_exec_time_0.5"; +SET SESSION debug="+d,query_exec_time_2.1"; +SET SESSION debug="+d,query_exec_time_2.3"; +SET SESSION debug="+d,query_exec_time_2.5"; +SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; SELECT d.count, (SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count, (SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total, @@ -259,9 +183,8 @@ SELECT d.count, (SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0; count query_count query_total not_zero_region_count region_count -1 20 17 3 14 -11 20 17 3 14 -8 20 17 3 14 +11 19 17 2 14 +8 19 17 2 14 SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; region_count 14 @@ -289,65 +212,27 @@ SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; Variable_name Value query_response_time_range_base 7 FLUSH QUERY_RESPONSE_TIME; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; -SELECT SLEEP(0.31); -SLEEP(0.31) -0 -SELECT SLEEP(0.32); -SLEEP(0.32) -0 -SELECT SLEEP(0.33); -SLEEP(0.33) -0 -SELECT SLEEP(0.34); -SLEEP(0.34) -0 -SELECT SLEEP(0.35); -SLEEP(0.35) -0 -SELECT SLEEP(0.36); -SLEEP(0.36) -0 -SELECT SLEEP(0.37); -SLEEP(0.37) -0 -SELECT SLEEP(0.38); -SLEEP(0.38) -0 -SELECT SLEEP(0.39); -SLEEP(0.39) -0 -SELECT SLEEP(0.40); -SLEEP(0.40) -0 -SELECT SLEEP(1.1); -SLEEP(1.1) -0 -SELECT SLEEP(1.2); -SLEEP(1.2) -0 -SELECT SLEEP(1.3); -SLEEP(1.3) -0 -SELECT SLEEP(1.5); -SLEEP(1.5) -0 -SELECT SLEEP(1.4); -SLEEP(1.4) -0 -SELECT SLEEP(0.5); -SLEEP(0.5) -0 -SELECT SLEEP(2.1); -SLEEP(2.1) -0 -SELECT SLEEP(2.3); -SLEEP(2.3) -0 -SELECT SLEEP(2.5); -SLEEP(2.5) -0 -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; +SET GLOBAL QUERY_RESPONSE_TIME_STATS=1; +SET SESSION debug="+d,query_exec_time_0.31"; +SET SESSION debug="+d,query_exec_time_0.32"; +SET SESSION debug="+d,query_exec_time_0.33"; +SET SESSION debug="+d,query_exec_time_0.34"; +SET SESSION debug="+d,query_exec_time_0.35"; +SET SESSION debug="+d,query_exec_time_0.36"; +SET SESSION debug="+d,query_exec_time_0.37"; +SET SESSION debug="+d,query_exec_time_0.38"; +SET SESSION debug="+d,query_exec_time_0.39"; +SET SESSION debug="+d,query_exec_time_0.4"; +SET SESSION debug="+d,query_exec_time_1.1"; +SET SESSION debug="+d,query_exec_time_1.2"; +SET SESSION debug="+d,query_exec_time_1.3"; +SET SESSION debug="+d,query_exec_time_1.5"; +SET SESSION debug="+d,query_exec_time_1.4"; +SET SESSION debug="+d,query_exec_time_0.5"; +SET SESSION debug="+d,query_exec_time_2.1"; +SET SESSION debug="+d,query_exec_time_2.3"; +SET SESSION debug="+d,query_exec_time_2.5"; +SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; SELECT d.count, (SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count, (SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total, @@ -355,9 +240,8 @@ SELECT d.count, (SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0; count query_count query_total not_zero_region_count region_count -1 20 17 3 17 -11 20 17 3 17 -8 20 17 3 17 +11 19 17 2 17 +8 19 17 2 17 SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; region_count 17 @@ -388,65 +272,27 @@ SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; Variable_name Value query_response_time_range_base 156 FLUSH QUERY_RESPONSE_TIME; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; -SELECT SLEEP(0.31); -SLEEP(0.31) -0 -SELECT SLEEP(0.32); -SLEEP(0.32) -0 -SELECT SLEEP(0.33); -SLEEP(0.33) -0 -SELECT SLEEP(0.34); -SLEEP(0.34) -0 -SELECT SLEEP(0.35); -SLEEP(0.35) -0 -SELECT SLEEP(0.36); -SLEEP(0.36) -0 -SELECT SLEEP(0.37); -SLEEP(0.37) -0 -SELECT SLEEP(0.38); -SLEEP(0.38) -0 -SELECT SLEEP(0.39); -SLEEP(0.39) -0 -SELECT SLEEP(0.40); -SLEEP(0.40) -0 -SELECT SLEEP(1.1); -SLEEP(1.1) -0 -SELECT SLEEP(1.2); -SLEEP(1.2) -0 -SELECT SLEEP(1.3); -SLEEP(1.3) -0 -SELECT SLEEP(1.5); -SLEEP(1.5) -0 -SELECT SLEEP(1.4); -SLEEP(1.4) -0 -SELECT SLEEP(0.5); -SLEEP(0.5) -0 -SELECT SLEEP(2.1); -SLEEP(2.1) -0 -SELECT SLEEP(2.3); -SLEEP(2.3) -0 -SELECT SLEEP(2.5); -SLEEP(2.5) -0 -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; +SET GLOBAL QUERY_RESPONSE_TIME_STATS=1; +SET SESSION debug="+d,query_exec_time_0.31"; +SET SESSION debug="+d,query_exec_time_0.32"; +SET SESSION debug="+d,query_exec_time_0.33"; +SET SESSION debug="+d,query_exec_time_0.34"; +SET SESSION debug="+d,query_exec_time_0.35"; +SET SESSION debug="+d,query_exec_time_0.36"; +SET SESSION debug="+d,query_exec_time_0.37"; +SET SESSION debug="+d,query_exec_time_0.38"; +SET SESSION debug="+d,query_exec_time_0.39"; +SET SESSION debug="+d,query_exec_time_0.4"; +SET SESSION debug="+d,query_exec_time_1.1"; +SET SESSION debug="+d,query_exec_time_1.2"; +SET SESSION debug="+d,query_exec_time_1.3"; +SET SESSION debug="+d,query_exec_time_1.5"; +SET SESSION debug="+d,query_exec_time_1.4"; +SET SESSION debug="+d,query_exec_time_0.5"; +SET SESSION debug="+d,query_exec_time_2.1"; +SET SESSION debug="+d,query_exec_time_2.3"; +SET SESSION debug="+d,query_exec_time_2.5"; +SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; SELECT d.count, (SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count, (SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total, @@ -454,9 +300,8 @@ SELECT d.count, (SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0; count query_count query_total not_zero_region_count region_count -1 20 17 3 7 -11 20 17 3 7 -8 20 17 3 7 +11 19 17 2 7 +8 19 17 2 7 SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; region_count 7 @@ -477,65 +322,27 @@ SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; Variable_name Value query_response_time_range_base 1000 FLUSH QUERY_RESPONSE_TIME; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; -SELECT SLEEP(0.31); -SLEEP(0.31) -0 -SELECT SLEEP(0.32); -SLEEP(0.32) -0 -SELECT SLEEP(0.33); -SLEEP(0.33) -0 -SELECT SLEEP(0.34); -SLEEP(0.34) -0 -SELECT SLEEP(0.35); -SLEEP(0.35) -0 -SELECT SLEEP(0.36); -SLEEP(0.36) -0 -SELECT SLEEP(0.37); -SLEEP(0.37) -0 -SELECT SLEEP(0.38); -SLEEP(0.38) -0 -SELECT SLEEP(0.39); -SLEEP(0.39) -0 -SELECT SLEEP(0.40); -SLEEP(0.40) -0 -SELECT SLEEP(1.1); -SLEEP(1.1) -0 -SELECT SLEEP(1.2); -SLEEP(1.2) -0 -SELECT SLEEP(1.3); -SLEEP(1.3) -0 -SELECT SLEEP(1.5); -SLEEP(1.5) -0 -SELECT SLEEP(1.4); -SLEEP(1.4) -0 -SELECT SLEEP(0.5); -SLEEP(0.5) -0 -SELECT SLEEP(2.1); -SLEEP(2.1) -0 -SELECT SLEEP(2.3); -SLEEP(2.3) -0 -SELECT SLEEP(2.5); -SLEEP(2.5) -0 -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; +SET GLOBAL QUERY_RESPONSE_TIME_STATS=1; +SET SESSION debug="+d,query_exec_time_0.31"; +SET SESSION debug="+d,query_exec_time_0.32"; +SET SESSION debug="+d,query_exec_time_0.33"; +SET SESSION debug="+d,query_exec_time_0.34"; +SET SESSION debug="+d,query_exec_time_0.35"; +SET SESSION debug="+d,query_exec_time_0.36"; +SET SESSION debug="+d,query_exec_time_0.37"; +SET SESSION debug="+d,query_exec_time_0.38"; +SET SESSION debug="+d,query_exec_time_0.39"; +SET SESSION debug="+d,query_exec_time_0.4"; +SET SESSION debug="+d,query_exec_time_1.1"; +SET SESSION debug="+d,query_exec_time_1.2"; +SET SESSION debug="+d,query_exec_time_1.3"; +SET SESSION debug="+d,query_exec_time_1.5"; +SET SESSION debug="+d,query_exec_time_1.4"; +SET SESSION debug="+d,query_exec_time_0.5"; +SET SESSION debug="+d,query_exec_time_2.1"; +SET SESSION debug="+d,query_exec_time_2.3"; +SET SESSION debug="+d,query_exec_time_2.5"; +SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; SELECT d.count, (SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count, (SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total, @@ -543,9 +350,8 @@ SELECT d.count, (SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0; count query_count query_total not_zero_region_count region_count -1 20 17 3 6 -11 20 17 3 6 -8 20 17 3 6 +11 19 17 2 6 +8 19 17 2 6 SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; region_count 6 @@ -566,5 +372,6 @@ Warning 1292 Truncated incorrect query_response_time_range_base value: '1001' SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; Variable_name Value query_response_time_range_base 1000 -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; +SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE =10; +SET GLOBAL debug=default; diff --git a/mysql-test/suite/percona/percona_query_response_time.test b/mysql-test/suite/percona/percona_query_response_time.test index a58cafc8d01..f2df156b13d 100644 --- a/mysql-test/suite/percona/percona_query_response_time.test +++ b/mysql-test/suite/percona/percona_query_response_time.test @@ -1,4 +1,8 @@ -source include/have_innodb.inc; +--source include/have_response_time_distribution.inc +--source include/have_debug.inc + +SET GLOBAL debug="d,query_exec_time_debug"; + SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1; SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 2; @@ -7,9 +11,9 @@ SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; source include/percona_query_response_time_flush.inc; source include/percona_query_response_time_show.inc; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; +SET GLOBAL QUERY_RESPONSE_TIME_STATS=1; source include/percona_query_response_time_sleep.inc; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; +SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; source include/percona_query_response_time_show.inc; @@ -18,9 +22,9 @@ SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10; SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; source include/percona_query_response_time_flush.inc; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; +SET GLOBAL QUERY_RESPONSE_TIME_STATS=1; source include/percona_query_response_time_sleep.inc; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; +SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; source include/percona_query_response_time_show.inc; @@ -29,9 +33,9 @@ SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 7; SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; source include/percona_query_response_time_flush.inc; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; +SET GLOBAL QUERY_RESPONSE_TIME_STATS=1; source include/percona_query_response_time_sleep.inc; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; +SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; source include/percona_query_response_time_show.inc; @@ -40,9 +44,9 @@ SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 156; SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; source include/percona_query_response_time_flush.inc; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; +SET GLOBAL QUERY_RESPONSE_TIME_STATS=1; source include/percona_query_response_time_sleep.inc; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; +SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; source include/percona_query_response_time_show.inc; @@ -51,9 +55,9 @@ SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1000; SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; source include/percona_query_response_time_flush.inc; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; +SET GLOBAL QUERY_RESPONSE_TIME_STATS=1; source include/percona_query_response_time_sleep.inc; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; +SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; source include/percona_query_response_time_show.inc; @@ -61,5 +65,7 @@ SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1001; SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; +SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE =10; + +SET GLOBAL debug=default; diff --git a/mysql-test/include/percona_query_response_time_flush.inc b/mysql-test/suite/percona/percona_query_response_time_flush.inc index 44bb320fe13..44bb320fe13 100644 --- a/mysql-test/include/percona_query_response_time_flush.inc +++ b/mysql-test/suite/percona/percona_query_response_time_flush.inc diff --git a/mysql-test/include/percona_query_response_time_show.inc b/mysql-test/suite/percona/percona_query_response_time_show.inc index 709abf9872e..709abf9872e 100644 --- a/mysql-test/include/percona_query_response_time_show.inc +++ b/mysql-test/suite/percona/percona_query_response_time_show.inc diff --git a/mysql-test/suite/percona/percona_query_response_time_sleep.inc b/mysql-test/suite/percona/percona_query_response_time_sleep.inc new file mode 100644 index 00000000000..d889fd9f98d --- /dev/null +++ b/mysql-test/suite/percona/percona_query_response_time_sleep.inc @@ -0,0 +1,19 @@ +SET SESSION debug="+d,query_exec_time_0.31"; +SET SESSION debug="+d,query_exec_time_0.32"; +SET SESSION debug="+d,query_exec_time_0.33"; +SET SESSION debug="+d,query_exec_time_0.34"; +SET SESSION debug="+d,query_exec_time_0.35"; +SET SESSION debug="+d,query_exec_time_0.36"; +SET SESSION debug="+d,query_exec_time_0.37"; +SET SESSION debug="+d,query_exec_time_0.38"; +SET SESSION debug="+d,query_exec_time_0.39"; +SET SESSION debug="+d,query_exec_time_0.4"; +SET SESSION debug="+d,query_exec_time_1.1"; +SET SESSION debug="+d,query_exec_time_1.2"; +SET SESSION debug="+d,query_exec_time_1.3"; +SET SESSION debug="+d,query_exec_time_1.5"; +SET SESSION debug="+d,query_exec_time_1.4"; +SET SESSION debug="+d,query_exec_time_0.5"; +SET SESSION debug="+d,query_exec_time_2.1"; +SET SESSION debug="+d,query_exec_time_2.3"; +SET SESSION debug="+d,query_exec_time_2.5"; diff --git a/mysql-test/suite/percona/percona_server_variables.inc b/mysql-test/suite/percona/percona_server_variables.inc new file mode 100644 index 00000000000..60c8e0ba759 --- /dev/null +++ b/mysql-test/suite/percona/percona_server_variables.inc @@ -0,0 +1,3 @@ +--source have_response_time_distribution.inc +--source include/have_xtradb.inc +SELECT Variable_name FROM INFORMATION_SCHEMA.SESSION_VARIABLES ORDER BY 1; diff --git a/mysql-test/suite/percona/percona_server_variables.result b/mysql-test/suite/percona/percona_server_variables.result deleted file mode 100644 index cb2af0d3d0e..00000000000 --- a/mysql-test/suite/percona/percona_server_variables.result +++ /dev/null @@ -1,342 +0,0 @@ -show variables; -Variable_name Value -auto_increment_increment Value -auto_increment_offset Value -autocommit Value -automatic_sp_privileges Value -back_log Value -basedir Value -big_tables Value -binlog_cache_size Value -binlog_direct_non_transactional_updates Value -binlog_format Value -bulk_insert_buffer_size Value -character_set_client Value -character_set_connection Value -character_set_database Value -character_set_filesystem Value -character_set_results Value -character_set_server Value -character_set_system Value -character_sets_dir Value -collation_connection Value -collation_database Value -collation_server Value -completion_type Value -concurrent_insert Value -connect_timeout Value -datadir Value -date_format Value -datetime_format Value -debug Value -debug_sync Value -default_week_format Value -delay_key_write Value -delayed_insert_limit Value -delayed_insert_timeout Value -delayed_queue_size Value -div_precision_increment Value -enable_query_response_time_stats Value -engine_condition_pushdown Value -error_count Value -event_scheduler Value -expire_logs_days Value -fast_index_creation Value -flush Value -flush_time Value -foreign_key_checks Value -ft_boolean_syntax Value -ft_max_word_len Value -ft_min_word_len Value -ft_query_expansion_limit Value -ft_stopword_file Value -general_log Value -general_log_file Value -group_concat_max_len Value -have_community_features Value -have_compress Value -have_crypt Value -have_csv Value -have_dynamic_loading Value -have_geometry Value -have_innodb Value -have_ndbcluster Value -have_openssl Value -have_partitioning Value -have_query_cache Value -have_rtree_keys Value -have_ssl Value -have_symlink Value -hostname Value -identity Value -ignore_builtin_innodb Value -init_connect Value -init_file Value -init_slave Value -innodb_adaptive_checkpoint Value -innodb_adaptive_flushing Value -innodb_adaptive_hash_index Value -innodb_additional_mem_pool_size Value -innodb_auto_lru_dump Value -innodb_autoextend_increment Value -innodb_autoinc_lock_mode Value -innodb_buffer_pool_shm_checksum Value -innodb_buffer_pool_shm_key Value -innodb_buffer_pool_size Value -innodb_change_buffering Value -innodb_checkpoint_age_target Value -innodb_checksums Value -innodb_commit_concurrency Value -innodb_concurrency_tickets Value -innodb_data_file_path Value -innodb_data_home_dir Value -innodb_dict_size_limit Value -innodb_doublewrite Value -innodb_doublewrite_file Value -innodb_enable_unsafe_group_commit Value -innodb_expand_import Value -innodb_extra_rsegments Value -innodb_extra_undoslots Value -innodb_fast_checksum Value -innodb_fast_recovery Value -innodb_fast_shutdown Value -innodb_file_format Value -innodb_file_format_check Value -innodb_file_per_table Value -innodb_flush_log_at_trx_commit Value -innodb_flush_log_at_trx_commit_session Value -innodb_flush_method Value -innodb_flush_neighbor_pages Value -innodb_force_recovery Value -innodb_ibuf_accel_rate Value -innodb_ibuf_active_contract Value -innodb_ibuf_max_size Value -innodb_io_capacity Value -innodb_lock_wait_timeout Value -innodb_locks_unsafe_for_binlog Value -innodb_log_buffer_size Value -innodb_log_file_size Value -innodb_log_files_in_group Value -innodb_log_group_home_dir Value -innodb_max_dirty_pages_pct Value -innodb_max_purge_lag Value -innodb_mirrored_log_groups Value -innodb_old_blocks_pct Value -innodb_old_blocks_time Value -innodb_open_files Value -innodb_overwrite_relay_log_info Value -innodb_page_size Value -innodb_pass_corrupt_table Value -innodb_read_ahead Value -innodb_read_ahead_threshold Value -innodb_read_io_threads Value -innodb_recovery_stats Value -innodb_replication_delay Value -innodb_rollback_on_timeout Value -innodb_show_locks_held Value -innodb_show_verbose_locks Value -innodb_spin_wait_delay Value -innodb_stats_auto_update Value -innodb_stats_method Value -innodb_stats_on_metadata Value -innodb_stats_sample_pages Value -innodb_stats_update_need_lock Value -innodb_strict_mode Value -innodb_support_xa Value -innodb_sync_spin_loops Value -innodb_table_locks Value -innodb_thread_concurrency Value -innodb_thread_concurrency_timer_based Value -innodb_thread_sleep_delay Value -innodb_use_purge_thread Value -innodb_use_sys_malloc Value -innodb_use_sys_stats_table Value -innodb_version Value -innodb_write_io_threads Value -insert_id Value -interactive_timeout Value -join_buffer_size Value -keep_files_on_create Value -key_buffer_size Value -key_cache_age_threshold Value -key_cache_block_size Value -key_cache_division_limit Value -language Value -large_files_support Value -large_page_size Value -large_pages Value -last_insert_id Value -lc_time_names Value -license Value -local_infile Value -locked_in_memory Value -log Value -log_bin Value -log_bin_trust_function_creators Value -log_bin_trust_routine_creators Value -log_error Value -log_output Value -log_queries_not_using_indexes Value -log_slave_updates Value -log_slow_filter Value -log_slow_queries Value -log_slow_rate_limit Value -log_slow_slave_statements Value -log_slow_sp_statements Value -log_slow_timestamp_every Value -log_slow_verbosity Value -log_warnings Value -long_query_time Value -low_priority_updates Value -lower_case_file_system Value -lower_case_table_names Value -max_allowed_packet Value -max_binlog_cache_size Value -max_binlog_size Value -max_connect_errors Value -max_connections Value -max_delayed_threads Value -max_error_count Value -max_heap_table_size Value -max_insert_delayed_threads Value -max_join_size Value -max_length_for_sort_data Value -max_prepared_stmt_count Value -max_relay_log_size Value -max_seeks_for_key Value -max_sort_length Value -max_sp_recursion_depth Value -max_tmp_tables Value -max_user_connections Value -max_write_lock_count Value -min_examined_row_limit Value -multi_range_count Value -myisam_data_pointer_size Value -myisam_max_sort_file_size Value -myisam_mmap_size Value -myisam_recover_options Value -myisam_repair_threads Value -myisam_sort_buffer_size Value -myisam_stats_method Value -myisam_use_mmap Value -net_buffer_length Value -net_read_timeout Value -net_retry_count Value -net_write_timeout Value -new Value -old Value -old_alter_table Value -old_passwords Value -open_files_limit Value -optimizer_fix Value -optimizer_prune_level Value -optimizer_search_depth Value -optimizer_switch Value -pid_file Value -plugin_dir Value -port Value -preload_buffer_size Value -profiling Value -profiling_history_size Value -profiling_server Value -profiling_use_getrusage Value -protocol_version Value -pseudo_thread_id Value -query_alloc_block_size Value -query_cache_limit Value -query_cache_min_res_unit Value -query_cache_size Value -query_cache_strip_comments Value -query_cache_type Value -query_cache_wlock_invalidate Value -query_prealloc_size Value -query_response_time_range_base Value -rand_seed1 Value -rand_seed2 Value -range_alloc_block_size Value -read_buffer_size Value -read_only Value -read_rnd_buffer_size Value -relay_log Value -relay_log_index Value -relay_log_info_file Value -relay_log_purge Value -relay_log_space_limit Value -report_host Value -report_password Value -report_port Value -report_user Value -rpl_recovery_rank Value -secure_auth Value -secure_file_priv Value -server_id Value -skip_external_locking Value -skip_name_resolve Value -skip_networking Value -skip_show_database Value -slave_compressed_protocol Value -slave_exec_mode Value -slave_load_tmpdir Value -slave_net_timeout Value -slave_skip_errors Value -slave_transaction_retries Value -slow_launch_time Value -slow_query_log Value -slow_query_log_file Value -slow_query_log_microseconds_timestamp Value -socket Value -sort_buffer_size Value -sql_auto_is_null Value -sql_big_selects Value -sql_big_tables Value -sql_buffer_result Value -sql_log_bin Value -sql_log_off Value -sql_log_update Value -sql_low_priority_updates Value -sql_max_join_size Value -sql_mode Value -sql_notes Value -sql_quote_show_create Value -sql_safe_updates Value -sql_select_limit Value -sql_slave_skip_counter Value -sql_warnings Value -ssl_ca Value -ssl_capath Value -ssl_cert Value -ssl_cipher Value -ssl_key Value -storage_engine Value -suppress_log_warning_1592 Value -sync_binlog Value -sync_frm Value -system_time_zone Value -table_definition_cache Value -table_lock_wait_timeout Value -table_open_cache Value -table_type Value -thread_cache_size Value -thread_handling Value -thread_stack Value -thread_statistics Value -time_format Value -time_zone Value -timed_mutexes Value -timestamp Value -tmp_table_size Value -tmpdir Value -transaction_alloc_block_size Value -transaction_prealloc_size Value -tx_isolation Value -unique_checks Value -updatable_views_with_limit Value -use_global_log_slow_control Value -use_global_long_query_time Value -userstat_running Value -version Value -version_comment Value -version_compile_machine Value -version_compile_os Value -wait_timeout Value -warning_count Value diff --git a/mysql-test/suite/percona/percona_server_variables.test b/mysql-test/suite/percona/percona_server_variables.test deleted file mode 100644 index 232cbb15e25..00000000000 --- a/mysql-test/suite/percona/percona_server_variables.test +++ /dev/null @@ -1,7 +0,0 @@ ---source include/have_innodb.inc ---source include/have_debug.inc - -#check the list of variable names ---replace_column 2 Value -show variables; - diff --git a/mysql-test/suite/percona/percona_server_variables_debug.result b/mysql-test/suite/percona/percona_server_variables_debug.result new file mode 100644 index 00000000000..1ffaa6a7704 --- /dev/null +++ b/mysql-test/suite/percona/percona_server_variables_debug.result @@ -0,0 +1,371 @@ +SELECT Variable_name FROM INFORMATION_SCHEMA.SESSION_VARIABLES ORDER BY 1; +Variable_name +AUTOCOMMIT +AUTOMATIC_SP_PRIVILEGES +AUTO_INCREMENT_INCREMENT +AUTO_INCREMENT_OFFSET +BACK_LOG +BASEDIR +BIG_TABLES +BINLOG_CACHE_SIZE +BINLOG_DIRECT_NON_TRANSACTIONAL_UPDATES +BINLOG_FORMAT +BINLOG_STMT_CACHE_SIZE +BULK_INSERT_BUFFER_SIZE +CHARACTER_SETS_DIR +CHARACTER_SET_CLIENT +CHARACTER_SET_CONNECTION +CHARACTER_SET_DATABASE +CHARACTER_SET_FILESYSTEM +CHARACTER_SET_RESULTS +CHARACTER_SET_SERVER +CHARACTER_SET_SYSTEM +COLLATION_CONNECTION +COLLATION_DATABASE +COLLATION_SERVER +COMPLETION_TYPE +CONCURRENT_INSERT +CONNECT_TIMEOUT +DATADIR +DATETIME_FORMAT +DATE_FORMAT +DEBUG +DEBUG_SYNC +DEFAULT_STORAGE_ENGINE +DEFAULT_WEEK_FORMAT +DELAYED_INSERT_LIMIT +DELAYED_INSERT_TIMEOUT +DELAYED_QUEUE_SIZE +DELAY_KEY_WRITE +DIV_PRECISION_INCREMENT +ENGINE_CONDITION_PUSHDOWN +ERROR_COUNT +EVENT_SCHEDULER +EXPIRE_LOGS_DAYS +EXTERNAL_USER +FAST_INDEX_CREATION +FLUSH +FLUSH_TIME +FOREIGN_KEY_CHECKS +FT_BOOLEAN_SYNTAX +FT_MAX_WORD_LEN +FT_MIN_WORD_LEN +FT_QUERY_EXPANSION_LIMIT +FT_STOPWORD_FILE +GENERAL_LOG +GENERAL_LOG_FILE +GROUP_CONCAT_MAX_LEN +HAVE_COMPRESS +HAVE_CRYPT +HAVE_CSV +HAVE_DYNAMIC_LOADING +HAVE_GEOMETRY +HAVE_INNODB +HAVE_NDBCLUSTER +HAVE_OPENSSL +HAVE_PARTITIONING +HAVE_PROFILING +HAVE_QUERY_CACHE +HAVE_RESPONSE_TIME_DISTRIBUTION +HAVE_RTREE_KEYS +HAVE_SSL +HAVE_SYMLINK +HOSTNAME +IDENTITY +IGNORE_BUILTIN_INNODB +INIT_CONNECT +INIT_FILE +INIT_SLAVE +INNODB_ADAPTIVE_FLUSHING +INNODB_ADAPTIVE_FLUSHING_METHOD +INNODB_ADAPTIVE_HASH_INDEX +INNODB_ADAPTIVE_HASH_INDEX_PARTITIONS +INNODB_ADDITIONAL_MEM_POOL_SIZE +INNODB_AUTOEXTEND_INCREMENT +INNODB_AUTOINC_LOCK_MODE +INNODB_BUFFER_POOL_INSTANCES +INNODB_BUFFER_POOL_RESTORE_AT_STARTUP +INNODB_BUFFER_POOL_SHM_CHECKSUM +INNODB_BUFFER_POOL_SHM_KEY +INNODB_BUFFER_POOL_SIZE +INNODB_CHANGE_BUFFERING +INNODB_CHANGE_BUFFERING_DEBUG +INNODB_CHECKPOINT_AGE_TARGET +INNODB_CHECKSUMS +INNODB_COMMIT_CONCURRENCY +INNODB_CONCURRENCY_TICKETS +INNODB_CORRUPT_TABLE_ACTION +INNODB_DATA_FILE_PATH +INNODB_DATA_HOME_DIR +INNODB_DICT_SIZE_LIMIT +INNODB_DOUBLEWRITE +INNODB_DOUBLEWRITE_FILE +INNODB_FAST_CHECKSUM +INNODB_FAST_SHUTDOWN +INNODB_FILE_FORMAT +INNODB_FILE_FORMAT_CHECK +INNODB_FILE_FORMAT_MAX +INNODB_FILE_PER_TABLE +INNODB_FLUSH_LOG_AT_TRX_COMMIT +INNODB_FLUSH_METHOD +INNODB_FLUSH_NEIGHBOR_PAGES +INNODB_FORCE_RECOVERY +INNODB_IBUF_ACCEL_RATE +INNODB_IBUF_ACTIVE_CONTRACT +INNODB_IBUF_MAX_SIZE +INNODB_IMPORT_TABLE_FROM_XTRABACKUP +INNODB_IO_CAPACITY +INNODB_LAZY_DROP_TABLE +INNODB_LOCKS_UNSAFE_FOR_BINLOG +INNODB_LOCK_WAIT_TIMEOUT +INNODB_LOG_BLOCK_SIZE +INNODB_LOG_BUFFER_SIZE +INNODB_LOG_FILES_IN_GROUP +INNODB_LOG_FILE_SIZE +INNODB_LOG_GROUP_HOME_DIR +INNODB_MAX_DIRTY_PAGES_PCT +INNODB_MAX_PURGE_LAG +INNODB_MIRRORED_LOG_GROUPS +INNODB_OLD_BLOCKS_PCT +INNODB_OLD_BLOCKS_TIME +INNODB_OPEN_FILES +INNODB_PAGE_SIZE +INNODB_PURGE_BATCH_SIZE +INNODB_PURGE_THREADS +INNODB_READ_AHEAD +INNODB_READ_AHEAD_THRESHOLD +INNODB_READ_IO_THREADS +INNODB_RECOVERY_STATS +INNODB_RECOVERY_UPDATE_RELAY_LOG +INNODB_REPLICATION_DELAY +INNODB_ROLLBACK_ON_TIMEOUT +INNODB_ROLLBACK_SEGMENTS +INNODB_SHOW_LOCKS_HELD +INNODB_SHOW_VERBOSE_LOCKS +INNODB_SPIN_WAIT_DELAY +INNODB_STATS_AUTO_UPDATE +INNODB_STATS_METHOD +INNODB_STATS_ON_METADATA +INNODB_STATS_SAMPLE_PAGES +INNODB_STATS_UPDATE_NEED_LOCK +INNODB_STRICT_MODE +INNODB_SUPPORT_XA +INNODB_SYNC_SPIN_LOOPS +INNODB_TABLE_LOCKS +INNODB_THREAD_CONCURRENCY +INNODB_THREAD_CONCURRENCY_TIMER_BASED +INNODB_THREAD_SLEEP_DELAY +INNODB_USE_GLOBAL_FLUSH_LOG_AT_TRX_COMMIT +INNODB_USE_NATIVE_AIO +INNODB_USE_SYS_MALLOC +INNODB_USE_SYS_STATS_TABLE +INNODB_VERSION +INNODB_WRITE_IO_THREADS +INSERT_ID +INTERACTIVE_TIMEOUT +JOIN_BUFFER_SIZE +KEEP_FILES_ON_CREATE +KEY_BUFFER_SIZE +KEY_CACHE_AGE_THRESHOLD +KEY_CACHE_BLOCK_SIZE +KEY_CACHE_DIVISION_LIMIT +LARGE_FILES_SUPPORT +LARGE_PAGES +LARGE_PAGE_SIZE +LAST_INSERT_ID +LC_MESSAGES +LC_MESSAGES_DIR +LC_TIME_NAMES +LICENSE +LOCAL_INFILE +LOCKED_IN_MEMORY +LOCK_WAIT_TIMEOUT +LOG +LOG_BIN +LOG_BIN_TRUST_FUNCTION_CREATORS +LOG_ERROR +LOG_OUTPUT +LOG_QUERIES_NOT_USING_INDEXES +LOG_SLAVE_UPDATES +LOG_SLOW_FILTER +LOG_SLOW_QUERIES +LOG_SLOW_RATE_LIMIT +LOG_SLOW_SLAVE_STATEMENTS +LOG_SLOW_SP_STATEMENTS +LOG_SLOW_VERBOSITY +LOG_WARNINGS +LOG_WARNINGS_SUPPRESS +LONG_QUERY_TIME +LOWER_CASE_FILE_SYSTEM +LOWER_CASE_TABLE_NAMES +LOW_PRIORITY_UPDATES +MAX_ALLOWED_PACKET +MAX_BINLOG_CACHE_SIZE +MAX_BINLOG_SIZE +MAX_BINLOG_STMT_CACHE_SIZE +MAX_CONNECTIONS +MAX_CONNECT_ERRORS +MAX_DELAYED_THREADS +MAX_ERROR_COUNT +MAX_HEAP_TABLE_SIZE +MAX_INSERT_DELAYED_THREADS +MAX_JOIN_SIZE +MAX_LENGTH_FOR_SORT_DATA +MAX_LONG_DATA_SIZE +MAX_PREPARED_STMT_COUNT +MAX_RELAY_LOG_SIZE +MAX_SEEKS_FOR_KEY +MAX_SORT_LENGTH +MAX_SP_RECURSION_DEPTH +MAX_TMP_TABLES +MAX_USER_CONNECTIONS +MAX_WRITE_LOCK_COUNT +MIN_EXAMINED_ROW_LIMIT +MULTI_RANGE_COUNT +MYISAM_DATA_POINTER_SIZE +MYISAM_MAX_SORT_FILE_SIZE +MYISAM_MMAP_SIZE +MYISAM_RECOVER_OPTIONS +MYISAM_REPAIR_THREADS +MYISAM_SORT_BUFFER_SIZE +MYISAM_STATS_METHOD +MYISAM_USE_MMAP +NET_BUFFER_LENGTH +NET_READ_TIMEOUT +NET_RETRY_COUNT +NET_WRITE_TIMEOUT +NEW +OLD +OLD_ALTER_TABLE +OLD_PASSWORDS +OPEN_FILES_LIMIT +OPTIMIZER_FIX +OPTIMIZER_PRUNE_LEVEL +OPTIMIZER_SEARCH_DEPTH +OPTIMIZER_SWITCH +PERFORMANCE_SCHEMA +PERFORMANCE_SCHEMA_EVENTS_WAITS_HISTORY_LONG_SIZE +PERFORMANCE_SCHEMA_EVENTS_WAITS_HISTORY_SIZE +PERFORMANCE_SCHEMA_MAX_COND_CLASSES +PERFORMANCE_SCHEMA_MAX_COND_INSTANCES +PERFORMANCE_SCHEMA_MAX_FILE_CLASSES +PERFORMANCE_SCHEMA_MAX_FILE_HANDLES +PERFORMANCE_SCHEMA_MAX_FILE_INSTANCES +PERFORMANCE_SCHEMA_MAX_MUTEX_CLASSES +PERFORMANCE_SCHEMA_MAX_MUTEX_INSTANCES +PERFORMANCE_SCHEMA_MAX_RWLOCK_CLASSES +PERFORMANCE_SCHEMA_MAX_RWLOCK_INSTANCES +PERFORMANCE_SCHEMA_MAX_TABLE_HANDLES +PERFORMANCE_SCHEMA_MAX_TABLE_INSTANCES +PERFORMANCE_SCHEMA_MAX_THREAD_CLASSES +PERFORMANCE_SCHEMA_MAX_THREAD_INSTANCES +PID_FILE +PLUGIN_DIR +PORT +PRELOAD_BUFFER_SIZE +PROFILING +PROFILING_HISTORY_SIZE +PROTOCOL_VERSION +PROXY_USER +PSEUDO_THREAD_ID +QUERY_ALLOC_BLOCK_SIZE +QUERY_CACHE_LIMIT +QUERY_CACHE_MIN_RES_UNIT +QUERY_CACHE_SIZE +QUERY_CACHE_STRIP_COMMENTS +QUERY_CACHE_TYPE +QUERY_CACHE_WLOCK_INVALIDATE +QUERY_PREALLOC_SIZE +QUERY_RESPONSE_TIME_RANGE_BASE +QUERY_RESPONSE_TIME_STATS +RAND_SEED1 +RAND_SEED2 +RANGE_ALLOC_BLOCK_SIZE +READ_BUFFER_SIZE +READ_ONLY +READ_RND_BUFFER_SIZE +RELAY_LOG +RELAY_LOG_INDEX +RELAY_LOG_INFO_FILE +RELAY_LOG_PURGE +RELAY_LOG_RECOVERY +RELAY_LOG_SPACE_LIMIT +REPORT_HOST +REPORT_PASSWORD +REPORT_PORT +REPORT_USER +RPL_RECOVERY_RANK +SECURE_AUTH +SECURE_FILE_PRIV +SERVER_ID +SKIP_EXTERNAL_LOCKING +SKIP_NAME_RESOLVE +SKIP_NETWORKING +SKIP_SHOW_DATABASE +SLAVE_COMPRESSED_PROTOCOL +SLAVE_EXEC_MODE +SLAVE_LOAD_TMPDIR +SLAVE_NET_TIMEOUT +SLAVE_SKIP_ERRORS +SLAVE_TRANSACTION_RETRIES +SLAVE_TYPE_CONVERSIONS +SLOW_LAUNCH_TIME +SLOW_QUERY_LOG +SLOW_QUERY_LOG_FILE +SLOW_QUERY_LOG_TIMESTAMP_ALWAYS +SLOW_QUERY_LOG_TIMESTAMP_PRECISION +SLOW_QUERY_LOG_USE_GLOBAL_CONTROL +SOCKET +SORT_BUFFER_SIZE +SQL_AUTO_IS_NULL +SQL_BIG_SELECTS +SQL_BIG_TABLES +SQL_BUFFER_RESULT +SQL_LOG_BIN +SQL_LOG_OFF +SQL_LOW_PRIORITY_UPDATES +SQL_MAX_JOIN_SIZE +SQL_MODE +SQL_NOTES +SQL_QUOTE_SHOW_CREATE +SQL_SAFE_UPDATES +SQL_SELECT_LIMIT +SQL_SLAVE_SKIP_COUNTER +SQL_WARNINGS +SSL_CA +SSL_CAPATH +SSL_CERT +SSL_CIPHER +SSL_KEY +STORAGE_ENGINE +SYNC_BINLOG +SYNC_FRM +SYNC_MASTER_INFO +SYNC_RELAY_LOG +SYNC_RELAY_LOG_INFO +SYSTEM_TIME_ZONE +TABLE_DEFINITION_CACHE +TABLE_OPEN_CACHE +THREAD_CACHE_SIZE +THREAD_CONCURRENCY +THREAD_HANDLING +THREAD_STACK +THREAD_STATISTICS +TIMED_MUTEXES +TIMESTAMP +TIME_FORMAT +TIME_ZONE +TMPDIR +TMP_TABLE_SIZE +TRANSACTION_ALLOC_BLOCK_SIZE +TRANSACTION_PREALLOC_SIZE +TX_ISOLATION +UNIQUE_CHECKS +UPDATABLE_VIEWS_WITH_LIMIT +USERSTAT +VERSION +VERSION_COMMENT +VERSION_COMPILE_MACHINE +VERSION_COMPILE_OS +WAIT_TIMEOUT +WARNING_COUNT diff --git a/mysql-test/suite/percona/percona_server_variables_debug.test b/mysql-test/suite/percona/percona_server_variables_debug.test new file mode 100644 index 00000000000..971f6bae689 --- /dev/null +++ b/mysql-test/suite/percona/percona_server_variables_debug.test @@ -0,0 +1,2 @@ +--source include/have_debug.inc +--source percona_server_variables.inc diff --git a/mysql-test/suite/percona/percona_server_variables_release.result b/mysql-test/suite/percona/percona_server_variables_release.result new file mode 100644 index 00000000000..cabd69b19a6 --- /dev/null +++ b/mysql-test/suite/percona/percona_server_variables_release.result @@ -0,0 +1,368 @@ +SELECT Variable_name FROM INFORMATION_SCHEMA.SESSION_VARIABLES ORDER BY 1; +Variable_name +AUTOCOMMIT +AUTOMATIC_SP_PRIVILEGES +AUTO_INCREMENT_INCREMENT +AUTO_INCREMENT_OFFSET +BACK_LOG +BASEDIR +BIG_TABLES +BINLOG_CACHE_SIZE +BINLOG_DIRECT_NON_TRANSACTIONAL_UPDATES +BINLOG_FORMAT +BINLOG_STMT_CACHE_SIZE +BULK_INSERT_BUFFER_SIZE +CHARACTER_SETS_DIR +CHARACTER_SET_CLIENT +CHARACTER_SET_CONNECTION +CHARACTER_SET_DATABASE +CHARACTER_SET_FILESYSTEM +CHARACTER_SET_RESULTS +CHARACTER_SET_SERVER +CHARACTER_SET_SYSTEM +COLLATION_CONNECTION +COLLATION_DATABASE +COLLATION_SERVER +COMPLETION_TYPE +CONCURRENT_INSERT +CONNECT_TIMEOUT +DATADIR +DATETIME_FORMAT +DATE_FORMAT +DEFAULT_STORAGE_ENGINE +DEFAULT_WEEK_FORMAT +DELAYED_INSERT_LIMIT +DELAYED_INSERT_TIMEOUT +DELAYED_QUEUE_SIZE +DELAY_KEY_WRITE +DIV_PRECISION_INCREMENT +ENGINE_CONDITION_PUSHDOWN +ERROR_COUNT +EVENT_SCHEDULER +EXPIRE_LOGS_DAYS +EXTERNAL_USER +FAST_INDEX_CREATION +FLUSH +FLUSH_TIME +FOREIGN_KEY_CHECKS +FT_BOOLEAN_SYNTAX +FT_MAX_WORD_LEN +FT_MIN_WORD_LEN +FT_QUERY_EXPANSION_LIMIT +FT_STOPWORD_FILE +GENERAL_LOG +GENERAL_LOG_FILE +GROUP_CONCAT_MAX_LEN +HAVE_COMPRESS +HAVE_CRYPT +HAVE_CSV +HAVE_DYNAMIC_LOADING +HAVE_GEOMETRY +HAVE_INNODB +HAVE_NDBCLUSTER +HAVE_OPENSSL +HAVE_PARTITIONING +HAVE_PROFILING +HAVE_QUERY_CACHE +HAVE_RESPONSE_TIME_DISTRIBUTION +HAVE_RTREE_KEYS +HAVE_SSL +HAVE_SYMLINK +HOSTNAME +IDENTITY +IGNORE_BUILTIN_INNODB +INIT_CONNECT +INIT_FILE +INIT_SLAVE +INNODB_ADAPTIVE_FLUSHING +INNODB_ADAPTIVE_FLUSHING_METHOD +INNODB_ADAPTIVE_HASH_INDEX +INNODB_ADAPTIVE_HASH_INDEX_PARTITIONS +INNODB_ADDITIONAL_MEM_POOL_SIZE +INNODB_AUTOEXTEND_INCREMENT +INNODB_AUTOINC_LOCK_MODE +INNODB_BUFFER_POOL_INSTANCES +INNODB_BUFFER_POOL_RESTORE_AT_STARTUP +INNODB_BUFFER_POOL_SHM_CHECKSUM +INNODB_BUFFER_POOL_SHM_KEY +INNODB_BUFFER_POOL_SIZE +INNODB_CHANGE_BUFFERING +INNODB_CHECKPOINT_AGE_TARGET +INNODB_CHECKSUMS +INNODB_COMMIT_CONCURRENCY +INNODB_CONCURRENCY_TICKETS +INNODB_CORRUPT_TABLE_ACTION +INNODB_DATA_FILE_PATH +INNODB_DATA_HOME_DIR +INNODB_DICT_SIZE_LIMIT +INNODB_DOUBLEWRITE +INNODB_DOUBLEWRITE_FILE +INNODB_FAST_CHECKSUM +INNODB_FAST_SHUTDOWN +INNODB_FILE_FORMAT +INNODB_FILE_FORMAT_CHECK +INNODB_FILE_FORMAT_MAX +INNODB_FILE_PER_TABLE +INNODB_FLUSH_LOG_AT_TRX_COMMIT +INNODB_FLUSH_METHOD +INNODB_FLUSH_NEIGHBOR_PAGES +INNODB_FORCE_RECOVERY +INNODB_IBUF_ACCEL_RATE +INNODB_IBUF_ACTIVE_CONTRACT +INNODB_IBUF_MAX_SIZE +INNODB_IMPORT_TABLE_FROM_XTRABACKUP +INNODB_IO_CAPACITY +INNODB_LAZY_DROP_TABLE +INNODB_LOCKS_UNSAFE_FOR_BINLOG +INNODB_LOCK_WAIT_TIMEOUT +INNODB_LOG_BLOCK_SIZE +INNODB_LOG_BUFFER_SIZE +INNODB_LOG_FILES_IN_GROUP +INNODB_LOG_FILE_SIZE +INNODB_LOG_GROUP_HOME_DIR +INNODB_MAX_DIRTY_PAGES_PCT +INNODB_MAX_PURGE_LAG +INNODB_MIRRORED_LOG_GROUPS +INNODB_OLD_BLOCKS_PCT +INNODB_OLD_BLOCKS_TIME +INNODB_OPEN_FILES +INNODB_PAGE_SIZE +INNODB_PURGE_BATCH_SIZE +INNODB_PURGE_THREADS +INNODB_READ_AHEAD +INNODB_READ_AHEAD_THRESHOLD +INNODB_READ_IO_THREADS +INNODB_RECOVERY_STATS +INNODB_RECOVERY_UPDATE_RELAY_LOG +INNODB_REPLICATION_DELAY +INNODB_ROLLBACK_ON_TIMEOUT +INNODB_ROLLBACK_SEGMENTS +INNODB_SHOW_LOCKS_HELD +INNODB_SHOW_VERBOSE_LOCKS +INNODB_SPIN_WAIT_DELAY +INNODB_STATS_AUTO_UPDATE +INNODB_STATS_METHOD +INNODB_STATS_ON_METADATA +INNODB_STATS_SAMPLE_PAGES +INNODB_STATS_UPDATE_NEED_LOCK +INNODB_STRICT_MODE +INNODB_SUPPORT_XA +INNODB_SYNC_SPIN_LOOPS +INNODB_TABLE_LOCKS +INNODB_THREAD_CONCURRENCY +INNODB_THREAD_CONCURRENCY_TIMER_BASED +INNODB_THREAD_SLEEP_DELAY +INNODB_USE_GLOBAL_FLUSH_LOG_AT_TRX_COMMIT +INNODB_USE_NATIVE_AIO +INNODB_USE_SYS_MALLOC +INNODB_USE_SYS_STATS_TABLE +INNODB_VERSION +INNODB_WRITE_IO_THREADS +INSERT_ID +INTERACTIVE_TIMEOUT +JOIN_BUFFER_SIZE +KEEP_FILES_ON_CREATE +KEY_BUFFER_SIZE +KEY_CACHE_AGE_THRESHOLD +KEY_CACHE_BLOCK_SIZE +KEY_CACHE_DIVISION_LIMIT +LARGE_FILES_SUPPORT +LARGE_PAGES +LARGE_PAGE_SIZE +LAST_INSERT_ID +LC_MESSAGES +LC_MESSAGES_DIR +LC_TIME_NAMES +LICENSE +LOCAL_INFILE +LOCKED_IN_MEMORY +LOCK_WAIT_TIMEOUT +LOG +LOG_BIN +LOG_BIN_TRUST_FUNCTION_CREATORS +LOG_ERROR +LOG_OUTPUT +LOG_QUERIES_NOT_USING_INDEXES +LOG_SLAVE_UPDATES +LOG_SLOW_FILTER +LOG_SLOW_QUERIES +LOG_SLOW_RATE_LIMIT +LOG_SLOW_SLAVE_STATEMENTS +LOG_SLOW_SP_STATEMENTS +LOG_SLOW_VERBOSITY +LOG_WARNINGS +LOG_WARNINGS_SUPPRESS +LONG_QUERY_TIME +LOWER_CASE_FILE_SYSTEM +LOWER_CASE_TABLE_NAMES +LOW_PRIORITY_UPDATES +MAX_ALLOWED_PACKET +MAX_BINLOG_CACHE_SIZE +MAX_BINLOG_SIZE +MAX_BINLOG_STMT_CACHE_SIZE +MAX_CONNECTIONS +MAX_CONNECT_ERRORS +MAX_DELAYED_THREADS +MAX_ERROR_COUNT +MAX_HEAP_TABLE_SIZE +MAX_INSERT_DELAYED_THREADS +MAX_JOIN_SIZE +MAX_LENGTH_FOR_SORT_DATA +MAX_LONG_DATA_SIZE +MAX_PREPARED_STMT_COUNT +MAX_RELAY_LOG_SIZE +MAX_SEEKS_FOR_KEY +MAX_SORT_LENGTH +MAX_SP_RECURSION_DEPTH +MAX_TMP_TABLES +MAX_USER_CONNECTIONS +MAX_WRITE_LOCK_COUNT +MIN_EXAMINED_ROW_LIMIT +MULTI_RANGE_COUNT +MYISAM_DATA_POINTER_SIZE +MYISAM_MAX_SORT_FILE_SIZE +MYISAM_MMAP_SIZE +MYISAM_RECOVER_OPTIONS +MYISAM_REPAIR_THREADS +MYISAM_SORT_BUFFER_SIZE +MYISAM_STATS_METHOD +MYISAM_USE_MMAP +NET_BUFFER_LENGTH +NET_READ_TIMEOUT +NET_RETRY_COUNT +NET_WRITE_TIMEOUT +NEW +OLD +OLD_ALTER_TABLE +OLD_PASSWORDS +OPEN_FILES_LIMIT +OPTIMIZER_FIX +OPTIMIZER_PRUNE_LEVEL +OPTIMIZER_SEARCH_DEPTH +OPTIMIZER_SWITCH +PERFORMANCE_SCHEMA +PERFORMANCE_SCHEMA_EVENTS_WAITS_HISTORY_LONG_SIZE +PERFORMANCE_SCHEMA_EVENTS_WAITS_HISTORY_SIZE +PERFORMANCE_SCHEMA_MAX_COND_CLASSES +PERFORMANCE_SCHEMA_MAX_COND_INSTANCES +PERFORMANCE_SCHEMA_MAX_FILE_CLASSES +PERFORMANCE_SCHEMA_MAX_FILE_HANDLES +PERFORMANCE_SCHEMA_MAX_FILE_INSTANCES +PERFORMANCE_SCHEMA_MAX_MUTEX_CLASSES +PERFORMANCE_SCHEMA_MAX_MUTEX_INSTANCES +PERFORMANCE_SCHEMA_MAX_RWLOCK_CLASSES +PERFORMANCE_SCHEMA_MAX_RWLOCK_INSTANCES +PERFORMANCE_SCHEMA_MAX_TABLE_HANDLES +PERFORMANCE_SCHEMA_MAX_TABLE_INSTANCES +PERFORMANCE_SCHEMA_MAX_THREAD_CLASSES +PERFORMANCE_SCHEMA_MAX_THREAD_INSTANCES +PID_FILE +PLUGIN_DIR +PORT +PRELOAD_BUFFER_SIZE +PROFILING +PROFILING_HISTORY_SIZE +PROTOCOL_VERSION +PROXY_USER +PSEUDO_THREAD_ID +QUERY_ALLOC_BLOCK_SIZE +QUERY_CACHE_LIMIT +QUERY_CACHE_MIN_RES_UNIT +QUERY_CACHE_SIZE +QUERY_CACHE_STRIP_COMMENTS +QUERY_CACHE_TYPE +QUERY_CACHE_WLOCK_INVALIDATE +QUERY_PREALLOC_SIZE +QUERY_RESPONSE_TIME_RANGE_BASE +QUERY_RESPONSE_TIME_STATS +RAND_SEED1 +RAND_SEED2 +RANGE_ALLOC_BLOCK_SIZE +READ_BUFFER_SIZE +READ_ONLY +READ_RND_BUFFER_SIZE +RELAY_LOG +RELAY_LOG_INDEX +RELAY_LOG_INFO_FILE +RELAY_LOG_PURGE +RELAY_LOG_RECOVERY +RELAY_LOG_SPACE_LIMIT +REPORT_HOST +REPORT_PASSWORD +REPORT_PORT +REPORT_USER +RPL_RECOVERY_RANK +SECURE_AUTH +SECURE_FILE_PRIV +SERVER_ID +SKIP_EXTERNAL_LOCKING +SKIP_NAME_RESOLVE +SKIP_NETWORKING +SKIP_SHOW_DATABASE +SLAVE_COMPRESSED_PROTOCOL +SLAVE_EXEC_MODE +SLAVE_LOAD_TMPDIR +SLAVE_NET_TIMEOUT +SLAVE_SKIP_ERRORS +SLAVE_TRANSACTION_RETRIES +SLAVE_TYPE_CONVERSIONS +SLOW_LAUNCH_TIME +SLOW_QUERY_LOG +SLOW_QUERY_LOG_FILE +SLOW_QUERY_LOG_TIMESTAMP_ALWAYS +SLOW_QUERY_LOG_TIMESTAMP_PRECISION +SLOW_QUERY_LOG_USE_GLOBAL_CONTROL +SOCKET +SORT_BUFFER_SIZE +SQL_AUTO_IS_NULL +SQL_BIG_SELECTS +SQL_BIG_TABLES +SQL_BUFFER_RESULT +SQL_LOG_BIN +SQL_LOG_OFF +SQL_LOW_PRIORITY_UPDATES +SQL_MAX_JOIN_SIZE +SQL_MODE +SQL_NOTES +SQL_QUOTE_SHOW_CREATE +SQL_SAFE_UPDATES +SQL_SELECT_LIMIT +SQL_SLAVE_SKIP_COUNTER +SQL_WARNINGS +SSL_CA +SSL_CAPATH +SSL_CERT +SSL_CIPHER +SSL_KEY +STORAGE_ENGINE +SYNC_BINLOG +SYNC_FRM +SYNC_MASTER_INFO +SYNC_RELAY_LOG +SYNC_RELAY_LOG_INFO +SYSTEM_TIME_ZONE +TABLE_DEFINITION_CACHE +TABLE_OPEN_CACHE +THREAD_CACHE_SIZE +THREAD_CONCURRENCY +THREAD_HANDLING +THREAD_STACK +THREAD_STATISTICS +TIMED_MUTEXES +TIMESTAMP +TIME_FORMAT +TIME_ZONE +TMPDIR +TMP_TABLE_SIZE +TRANSACTION_ALLOC_BLOCK_SIZE +TRANSACTION_PREALLOC_SIZE +TX_ISOLATION +UNIQUE_CHECKS +UPDATABLE_VIEWS_WITH_LIMIT +USERSTAT +VERSION +VERSION_COMMENT +VERSION_COMPILE_MACHINE +VERSION_COMPILE_OS +WAIT_TIMEOUT +WARNING_COUNT diff --git a/mysql-test/suite/percona/percona_server_variables_release.test b/mysql-test/suite/percona/percona_server_variables_release.test new file mode 100644 index 00000000000..f61446aeb02 --- /dev/null +++ b/mysql-test/suite/percona/percona_server_variables_release.test @@ -0,0 +1,2 @@ +--source include/have_nodebug.inc +--source include/percona_server_variables.inc diff --git a/mysql-test/suite/percona/percona_show_slave_status_nolock.result b/mysql-test/suite/percona/percona_show_slave_status_nolock.result new file mode 100644 index 00000000000..1d6114a001e --- /dev/null +++ b/mysql-test/suite/percona/percona_show_slave_status_nolock.result @@ -0,0 +1,21 @@ +include/master-slave.inc +[connection master] +DROP TABLE IF EXISTS t; +CREATE TABLE t(id INT); +INSERT INTO t SELECT SLEEP(10); +STOP SLAVE; +Warnings: +Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave. +master count(*) +master 1 +slave count(*) +slave 0 +SHOW SLAVE STATUS NOLOCK; +include/wait_for_slave_to_stop.inc +START SLAVE; +include/wait_for_slave_to_start.inc +slave count(*) +slave 1 +DROP TABLE t; +STOP SLAVE; +include/wait_for_slave_to_stop.inc diff --git a/mysql-test/suite/percona/percona_show_slave_status_nolock.test b/mysql-test/suite/percona/percona_show_slave_status_nolock.test new file mode 100644 index 00000000000..dcb2eb26a3e --- /dev/null +++ b/mysql-test/suite/percona/percona_show_slave_status_nolock.test @@ -0,0 +1,53 @@ +--source include/master-slave.inc +--source include/have_binlog_format_statement.inc +--disable_query_log +call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave. Statement:"); +call mtr.add_suppression("Slave SQL.*Request to stop slave SQL Thread received while applying a group that has non-transactional changes; waiting for completion of the group"); +--enable_query_log +connection master; + --disable_warnings + DROP TABLE IF EXISTS t; + --enable_warnings + CREATE TABLE t(id INT); + sync_slave_with_master; + +connection master; + send INSERT INTO t SELECT SLEEP(10); + +connection slave; + sleep 15; + send STOP SLAVE; + +connection master; + reap; + + --disable_query_log + select "master",count(*) from t; + --enable_query_log + +connection slave1; + --disable_query_log + select "slave",count(*) from t; + --enable_query_log + + --disable_result_log + SHOW SLAVE STATUS NOLOCK; + --enable_result_log + +connection slave; + reap; + + --source include/wait_for_slave_to_stop.inc + START SLAVE; + --source include/wait_for_slave_to_start.inc + + --disable_query_log + select "slave",count(*) from t; + --enable_query_log + +connection master; + DROP TABLE t; +sync_slave_with_master; +STOP SLAVE; +--source include/wait_for_slave_to_stop.inc + diff --git a/mysql-test/suite/percona/percona_slow_query_log-log_slow_filter-master.opt b/mysql-test/suite/percona/percona_slow_extended-log_slow_filter-master.opt index cb93f7abf05..865dc70ba38 100644 --- a/mysql-test/suite/percona/percona_slow_query_log-log_slow_filter-master.opt +++ b/mysql-test/suite/percona/percona_slow_extended-log_slow_filter-master.opt @@ -1 +1 @@ ---slow-query-log-file=percona_slow_query_log-log_slow_filter.log --long-query-time=1
\ No newline at end of file +--slow-query-log-file=percona_slow_query_log-log_slow_filter.log --long-query-time=1 --slow_query_log=OFF diff --git a/mysql-test/suite/percona/percona_slow_query_log-log_slow_filter.result b/mysql-test/suite/percona/percona_slow_extended-log_slow_filter.result index 9c8f69745a7..2f22ef5457b 100644 --- a/mysql-test/suite/percona/percona_slow_query_log-log_slow_filter.result +++ b/mysql-test/suite/percona/percona_slow_extended-log_slow_filter.result @@ -1,4 +1,3 @@ -SET GLOBAL SLOW_QUERY_LOG=OFF; drop table if exists t; # Create test table create table t(id INT PRIMARY KEY) engine=InnoDB; @@ -20,6 +19,7 @@ sleep(2) SELECT sleep(2); sleep(2) 0 +SET GLOBAL SLOW_QUERY_LOG=OFF; drop table if exists t; -cat MYSQLD_DATADIR/percona_slow_query_log-log_slow_filter.log | grep -c Query_time +FLUSH LOGS; 2 diff --git a/mysql-test/suite/percona/percona_slow_query_log-log_slow_filter.test b/mysql-test/suite/percona/percona_slow_extended-log_slow_filter.test index 44646de530a..292c1651e34 100644 --- a/mysql-test/suite/percona/percona_slow_query_log-log_slow_filter.test +++ b/mysql-test/suite/percona/percona_slow_extended-log_slow_filter.test @@ -1,8 +1,4 @@ --- source include/not_windows.inc - -source include/have_innodb.inc; - -SET GLOBAL SLOW_QUERY_LOG=OFF; +source include/have_xtradb.inc; --disable_warnings drop table if exists t; @@ -24,12 +20,13 @@ set log_slow_filter=full_join; SELECT sleep(2) union select t2.id from t as t1,t as t2; SELECT sleep(2); +SET GLOBAL SLOW_QUERY_LOG=OFF; + --disable_warnings drop table if exists t; --enable_warnings -let $MYSQLD_DATADIR= `select @@datadir`; -let $cmd = cat $MYSQLD_DATADIR/percona_slow_query_log-log_slow_filter.log | grep -c Query_time; ---replace_result $MYSQLD_DATADIR MYSQLD_DATADIR -exec echo '$cmd'; -exec $cmd; +FLUSH LOGS; +--let grep_file = $MYSQLTEST_VARDIR/mysqld.1/data/percona_slow_query_log-log_slow_filter.log +--let grep_pattern = Query_time +--source grep.inc diff --git a/mysql-test/suite/percona/percona_slow_extended-log_slow_sp_statements-cl-master.opt b/mysql-test/suite/percona/percona_slow_extended-log_slow_sp_statements-cl-master.opt new file mode 100644 index 00000000000..4368453928a --- /dev/null +++ b/mysql-test/suite/percona/percona_slow_extended-log_slow_sp_statements-cl-master.opt @@ -0,0 +1 @@ +--log_slow_sp_statements diff --git a/mysql-test/suite/percona/percona_slow_extended-log_slow_sp_statements-cl.result b/mysql-test/suite/percona/percona_slow_extended-log_slow_sp_statements-cl.result new file mode 100644 index 00000000000..c5653429327 --- /dev/null +++ b/mysql-test/suite/percona/percona_slow_extended-log_slow_sp_statements-cl.result @@ -0,0 +1,3 @@ +show global variables like 'log_slow_sp_statements'; +Variable_name Value +log_slow_sp_statements ON diff --git a/mysql-test/suite/percona/percona_slow_extended-log_slow_sp_statements-cl.test b/mysql-test/suite/percona/percona_slow_extended-log_slow_sp_statements-cl.test new file mode 100644 index 00000000000..47bd960feb5 --- /dev/null +++ b/mysql-test/suite/percona/percona_slow_extended-log_slow_sp_statements-cl.test @@ -0,0 +1 @@ +show global variables like 'log_slow_sp_statements'; diff --git a/mysql-test/suite/percona/percona_slow_extended-log_slow_verbosity-cl-master.opt b/mysql-test/suite/percona/percona_slow_extended-log_slow_verbosity-cl-master.opt new file mode 100644 index 00000000000..d8809c36981 --- /dev/null +++ b/mysql-test/suite/percona/percona_slow_extended-log_slow_verbosity-cl-master.opt @@ -0,0 +1 @@ +--log_slow_verbosity="full" diff --git a/mysql-test/suite/percona/percona_slow_extended-log_slow_verbosity-cl.result b/mysql-test/suite/percona/percona_slow_extended-log_slow_verbosity-cl.result new file mode 100644 index 00000000000..eb8228efb08 --- /dev/null +++ b/mysql-test/suite/percona/percona_slow_extended-log_slow_verbosity-cl.result @@ -0,0 +1,9 @@ +show global variables like 'log_slow_verbosity'; +Variable_name Value +log_slow_verbosity microtime,query_plan,innodb +show variables like 'log_slow_verbosity'; +Variable_name Value +log_slow_verbosity microtime,query_plan,innodb +select @@log_slow_verbosity; +@@log_slow_verbosity +microtime,query_plan,innodb diff --git a/mysql-test/suite/percona/percona_slow_extended-log_slow_verbosity-cl.test b/mysql-test/suite/percona/percona_slow_extended-log_slow_verbosity-cl.test new file mode 100644 index 00000000000..740c4deaebd --- /dev/null +++ b/mysql-test/suite/percona/percona_slow_extended-log_slow_verbosity-cl.test @@ -0,0 +1,3 @@ +show global variables like 'log_slow_verbosity'; +show variables like 'log_slow_verbosity'; +select @@log_slow_verbosity; diff --git a/mysql-test/suite/percona/percona_slow_query_log-log_slow_verbosity-master.opt b/mysql-test/suite/percona/percona_slow_extended-log_slow_verbosity-master.opt index 8d21f40a34f..19ae9c117f0 100644 --- a/mysql-test/suite/percona/percona_slow_query_log-log_slow_verbosity-master.opt +++ b/mysql-test/suite/percona/percona_slow_extended-log_slow_verbosity-master.opt @@ -1 +1 @@ ---slow-query-log-file=percona_slow_query_log-log_slow_verbosity.log --long-query-time=1
\ No newline at end of file +--slow-query-log-file=percona_slow_query_log-log_slow_verbosity.log --long-query-time=1 diff --git a/mysql-test/suite/percona/percona_slow_extended-log_slow_verbosity.result b/mysql-test/suite/percona/percona_slow_extended-log_slow_verbosity.result new file mode 100644 index 00000000000..1e7db10c8bd --- /dev/null +++ b/mysql-test/suite/percona/percona_slow_extended-log_slow_verbosity.result @@ -0,0 +1,9 @@ +SELECT sleep(2); +sleep(2) +0 +set log_slow_verbosity=innodb; +SELECT sleep(2); +sleep(2) +0 +FLUSH LOGS; +1 diff --git a/mysql-test/suite/percona/percona_slow_extended-log_slow_verbosity.test b/mysql-test/suite/percona/percona_slow_extended-log_slow_verbosity.test new file mode 100644 index 00000000000..e95ab54af61 --- /dev/null +++ b/mysql-test/suite/percona/percona_slow_extended-log_slow_verbosity.test @@ -0,0 +1,12 @@ +source include/have_xtradb.inc; + +SELECT sleep(2); + +set log_slow_verbosity=innodb; + +SELECT sleep(2); + +FLUSH LOGS; +--let grep_file = $MYSQLTEST_VARDIR/mysqld.1/data/percona_slow_query_log-log_slow_verbosity.log +--let grep_pattern = No InnoDB statistics available for this query +--source grep.inc diff --git a/mysql-test/suite/percona/percona_slow_query_log-long_query_time-master.opt b/mysql-test/suite/percona/percona_slow_extended-long_query_time-master.opt index 5cbb82d1261..62e1e981558 100644 --- a/mysql-test/suite/percona/percona_slow_query_log-long_query_time-master.opt +++ b/mysql-test/suite/percona/percona_slow_extended-long_query_time-master.opt @@ -1 +1 @@ ---slow-query-log-file=percona_slow_query_log-long_query_time.log --long-query-time=3 +--slow-query-log-file=percona_slow_query_log-long_query_time.log --long-query-time=2 --slow-query-log=OFF diff --git a/mysql-test/suite/percona/percona_slow_extended-long_query_time.result b/mysql-test/suite/percona/percona_slow_extended-long_query_time.result new file mode 100644 index 00000000000..f2da4e4d9d6 --- /dev/null +++ b/mysql-test/suite/percona/percona_slow_extended-long_query_time.result @@ -0,0 +1,24 @@ +SET GLOBAL SLOW_QUERY_LOG=ON; +SELECT sleep(1); +sleep(1) +0 +SELECT sleep(3); +sleep(3) +0 +SELECT sleep(5); +sleep(5) +0 +set long_query_time=4; +SELECT sleep(1); +sleep(1) +0 +SELECT sleep(3); +sleep(3) +0 +SELECT sleep(5); +sleep(5) +0 +set long_query_time=2; +SET GLOBAL SLOW_QUERY_LOG=OFF; +FLUSH LOGS; +3 diff --git a/mysql-test/suite/percona/percona_slow_extended-long_query_time.test b/mysql-test/suite/percona/percona_slow_extended-long_query_time.test new file mode 100644 index 00000000000..716cc7cb0c3 --- /dev/null +++ b/mysql-test/suite/percona/percona_slow_extended-long_query_time.test @@ -0,0 +1,23 @@ +source include/have_xtradb.inc; + +SET GLOBAL SLOW_QUERY_LOG=ON; + +SELECT sleep(1); +SELECT sleep(3); +SELECT sleep(5); + +set long_query_time=4; + +SELECT sleep(1); +SELECT sleep(3); +SELECT sleep(5); + +set long_query_time=2; + +SET GLOBAL SLOW_QUERY_LOG=OFF; + +FLUSH LOGS; +--let grep_file = $MYSQLTEST_VARDIR/mysqld.1/data/percona_slow_query_log-long_query_time.log +--let grep_pattern = Query_time +--source grep.inc + diff --git a/mysql-test/suite/percona/percona_slow_query_log-microseconds_in_slow_query_log-master.opt b/mysql-test/suite/percona/percona_slow_extended-microseconds_in_slow_extended-master.opt index 6433539d3d1..ca486d356f5 100644 --- a/mysql-test/suite/percona/percona_slow_query_log-microseconds_in_slow_query_log-master.opt +++ b/mysql-test/suite/percona/percona_slow_extended-microseconds_in_slow_extended-master.opt @@ -1 +1 @@ ---slow-query-log-file=percona_slow_query_log-microseconds_in_slow_query_log.log --long-query-time=1
\ No newline at end of file +--slow-query-log-file=percona_slow_query_log-microseconds_in_slow_query_log.log --long-query-time=1 --slow_query_log=OFF diff --git a/mysql-test/suite/percona/percona_slow_extended-microseconds_in_slow_extended.result b/mysql-test/suite/percona/percona_slow_extended-microseconds_in_slow_extended.result new file mode 100644 index 00000000000..ce27c518efe --- /dev/null +++ b/mysql-test/suite/percona/percona_slow_extended-microseconds_in_slow_extended.result @@ -0,0 +1,13 @@ +SET GLOBAL SLOW_QUERY_LOG=ON; +SELECT sleep(2); +sleep(2) +0 +set global slow_query_log_timestamp_precision='microsecond'; +SELECT sleep(2); +sleep(2) +0 +set global slow_query_log_timestamp_precision='second'; +SET GLOBAL SLOW_QUERY_LOG=OFF; +FLUSH LOGS; +1 +2 diff --git a/mysql-test/suite/percona/percona_slow_extended-microseconds_in_slow_extended.test b/mysql-test/suite/percona/percona_slow_extended-microseconds_in_slow_extended.test new file mode 100644 index 00000000000..4b437b21e4c --- /dev/null +++ b/mysql-test/suite/percona/percona_slow_extended-microseconds_in_slow_extended.test @@ -0,0 +1,23 @@ +source include/have_xtradb.inc; + +SET GLOBAL SLOW_QUERY_LOG=ON; + +SELECT sleep(2); + +set global slow_query_log_timestamp_precision='microsecond'; + +SELECT sleep(2); + +set global slow_query_log_timestamp_precision='second'; + +SET GLOBAL SLOW_QUERY_LOG=OFF; + +FLUSH LOGS; +--let grep_file = $MYSQLTEST_VARDIR/mysqld.1/data/percona_slow_query_log-microseconds_in_slow_query_log.log +--let grep_pattern = # Time: [0-9]+[ ]+[0-9]+:[0-9]+:[0-9]+.[0-9]+ +--source grep.inc + +--let grep_file = $MYSQLTEST_VARDIR/mysqld.1/data/percona_slow_query_log-microseconds_in_slow_query_log.log +--let grep_pattern = # Time: [0-9]+[ ]+[0-9]+:[0-9]+:[0-9]+ +--source grep.inc + diff --git a/mysql-test/suite/percona/percona_slow_query_log-min_examined_row_limit-master.opt b/mysql-test/suite/percona/percona_slow_extended-min_examined_row_limit-master.opt index 6f82556fb0c..c1cf3ebdb30 100644 --- a/mysql-test/suite/percona/percona_slow_query_log-min_examined_row_limit-master.opt +++ b/mysql-test/suite/percona/percona_slow_extended-min_examined_row_limit-master.opt @@ -1 +1 @@ ---slow-query-log-file=percona_slow_query_log-min_examined_row_limit.log --long-query-time=1
\ No newline at end of file +--slow-query-log-file=percona_slow_query_log-min_examined_row_limit.log --long-query-time=1 --slow-query-log=OFF diff --git a/mysql-test/suite/percona/percona_slow_query_log-min_examined_row_limit.result b/mysql-test/suite/percona/percona_slow_extended-min_examined_row_limit.result index 32698a59837..1e8bc0723ac 100644 --- a/mysql-test/suite/percona/percona_slow_query_log-min_examined_row_limit.result +++ b/mysql-test/suite/percona/percona_slow_extended-min_examined_row_limit.result @@ -1,4 +1,3 @@ -SET GLOBAL SLOW_QUERY_LOG=OFF; drop table if exists t; # Create test table create table t(id INT PRIMARY KEY) engine=InnoDB; @@ -20,6 +19,7 @@ sleep(2) SELECT sleep(2); sleep(2) 0 +SET GLOBAL SLOW_QUERY_LOG=OFF; drop table if exists t; -cat MYSQLD_DATADIR/percona_slow_query_log-min_examined_row_limit.log | grep -c Query_time +FLUSH LOGS; 2 diff --git a/mysql-test/suite/percona/percona_slow_query_log-min_examined_row_limit.test b/mysql-test/suite/percona/percona_slow_extended-min_examined_row_limit.test index 61276423b4d..ca68658a6c5 100644 --- a/mysql-test/suite/percona/percona_slow_query_log-min_examined_row_limit.test +++ b/mysql-test/suite/percona/percona_slow_extended-min_examined_row_limit.test @@ -1,7 +1,4 @@ -source include/not_windows.inc; -source include/have_innodb.inc; - -SET GLOBAL SLOW_QUERY_LOG=OFF; +source include/have_xtradb.inc; --disable_warnings drop table if exists t; @@ -23,12 +20,13 @@ set min_examined_row_limit=5; SELECT sleep(2) union select t2.id from t as t1,t as t2; SELECT sleep(2); +SET GLOBAL SLOW_QUERY_LOG=OFF; + --disable_warnings drop table if exists t; --enable_warnings -let $MYSQLD_DATADIR= `select @@datadir`; -let $cmd = cat $MYSQLD_DATADIR/percona_slow_query_log-min_examined_row_limit.log | grep -c Query_time; ---replace_result $MYSQLD_DATADIR MYSQLD_DATADIR -exec echo '$cmd'; -exec $cmd; +FLUSH LOGS; +--let grep_file = $MYSQLTEST_VARDIR/mysqld.1/data/percona_slow_query_log-min_examined_row_limit.log +--let grep_pattern = Query_time +--source grep.inc diff --git a/mysql-test/suite/percona/percona_slave_innodb_stats-master.opt b/mysql-test/suite/percona/percona_slow_extended-slave_innodb_stats-master.opt index 286a9c4484d..286a9c4484d 100644 --- a/mysql-test/suite/percona/percona_slave_innodb_stats-master.opt +++ b/mysql-test/suite/percona/percona_slow_extended-slave_innodb_stats-master.opt diff --git a/mysql-test/suite/percona/percona_slave_innodb_stats-slave.opt b/mysql-test/suite/percona/percona_slow_extended-slave_innodb_stats-slave.opt index 286a9c4484d..286a9c4484d 100644 --- a/mysql-test/suite/percona/percona_slave_innodb_stats-slave.opt +++ b/mysql-test/suite/percona/percona_slow_extended-slave_innodb_stats-slave.opt diff --git a/mysql-test/suite/percona/percona_slave_innodb_stats.result b/mysql-test/suite/percona/percona_slow_extended-slave_innodb_stats.result index c2406bdfd85..51993e767c2 100644 --- a/mysql-test/suite/percona/percona_slave_innodb_stats.result +++ b/mysql-test/suite/percona/percona_slow_extended-slave_innodb_stats.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP TABLE IF EXISTS t; CREATE TABLE t(id INT,data CHAR(30)) ENGINE=InnoDB; INSERT INTO t VALUES @@ -15,7 +11,12 @@ INSERT INTO t VALUES INSERT INTO t SELECT t2.id,t2.data from t as t1, t as t2; INSERT INTO t SELECT t2.id,t2.data from t as t1, t as t2; STOP SLAVE; +include/wait_for_slave_to_stop.inc START SLAVE; +include/wait_for_slave_to_start.inc INSERT INTO t SELECT t.id,t.data from t; DROP TABLE IF EXISTS t; +FLUSH LOGS; 4 +STOP SLAVE; +include/wait_for_slave_to_stop.inc diff --git a/mysql-test/suite/percona/percona_slave_innodb_stats.test b/mysql-test/suite/percona/percona_slow_extended-slave_innodb_stats.test index defcd1fc406..b0a6c98870c 100644 --- a/mysql-test/suite/percona/percona_slave_innodb_stats.test +++ b/mysql-test/suite/percona/percona_slow_extended-slave_innodb_stats.test @@ -1,5 +1,6 @@ -source include/have_innodb.inc; -source include/master-slave.inc; +-- source include/have_binlog_format_mixed_or_statement.inc +-- source include/have_xtradb.inc +-- source include/master-slave.inc connection master; -- disable_warnings @@ -40,4 +41,11 @@ connection master; DROP TABLE IF EXISTS t; sync_slave_with_master; -exec cat var/mysqld.2/mysqld-slow.log | grep InnoDB_IO_r_ops | wc -l; +connection slave; +FLUSH LOGS; +--let grep_file = $MYSQLTEST_VARDIR/mysqld.2/mysqld-slow.log +--let grep_pattern = InnoDB_IO_r_ops +--source grep.inc + +STOP SLAVE; +-- source include/wait_for_slave_to_stop.inc diff --git a/mysql-test/suite/percona/percona_log_slow_slave_statements-and-use_global_long_query_time-master.opt b/mysql-test/suite/percona/percona_slow_extended-slave_statements-and-use_global_long_query_time-master.opt index d600400af08..49038530c56 100644 --- a/mysql-test/suite/percona/percona_log_slow_slave_statements-and-use_global_long_query_time-master.opt +++ b/mysql-test/suite/percona/percona_slow_extended-slave_statements-and-use_global_long_query_time-master.opt @@ -1 +1 @@ ---slow-query-log-file=percona_log_slow_slave_statements-master.log --long-query-time=1
\ No newline at end of file +--slow-query-log-file=percona_log_slow_slave_statements-master.log --long-query-time=1 diff --git a/mysql-test/suite/percona/percona_log_slow_slave_statements-and-use_global_long_query_time-slave.opt b/mysql-test/suite/percona/percona_slow_extended-slave_statements-and-use_global_long_query_time-slave.opt index c79e637317b..648f309f744 100644 --- a/mysql-test/suite/percona/percona_log_slow_slave_statements-and-use_global_long_query_time-slave.opt +++ b/mysql-test/suite/percona/percona_slow_extended-slave_statements-and-use_global_long_query_time-slave.opt @@ -1 +1 @@ ---slow-query-log-file=percona_log_slow_slave_statements-slave.log --long-query-time=1
\ No newline at end of file +--slow-query-log-file=percona_log_slow_slave_statements-slave.log --long-query-time=1 diff --git a/mysql-test/suite/percona/percona_log_slow_slave_statements-and-use_global_long_query_time.result b/mysql-test/suite/percona/percona_slow_extended-slave_statements-and-use_global_long_query_time.result index c17e7a3f508..e5f4568dd58 100644 --- a/mysql-test/suite/percona/percona_log_slow_slave_statements-and-use_global_long_query_time.result +++ b/mysql-test/suite/percona/percona_slow_extended-slave_statements-and-use_global_long_query_time.result @@ -1,19 +1,10 @@ -# Activate master-slave replication -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -# Make table t for test +include/master-slave.inc +[connection master] DROP TABLE IF EXISTS t; CREATE TABLE t(id INT); -# Start slave replication START SLAVE; +include/wait_for_slave_to_start.inc INSERT INTO t VALUES (1); -# Read information about master binlog -# Sync(1) slave thread -# Read and change log_slow_slave_statements to ON on slave show variables like 'log_slow_slave_statements'; Variable_name Value log_slow_slave_statements OFF @@ -22,23 +13,20 @@ show variables like 'log_slow_slave_statements'; Variable_name Value log_slow_slave_statements ON INSERT INTO t VALUES (2); -# Read information about master binlog -# Sync slave(2) thread -# Restart slave STOP SLAVE; +include/wait_for_slave_to_stop.inc START SLAVE; +include/wait_for_slave_to_start.inc INSERT INTO t VALUES (3); -# Read information about master binlog -# Sync(3) slave thread show variables like 'long_query_time'; Variable_name Value long_query_time 1.000000 show global variables like 'long_query_time'; Variable_name Value long_query_time 1.000000 -show global variables like 'use_global_long_query_time'; +show global variables like 'slow_query_log_use_global_control'; Variable_name Value -use_global_long_query_time OFF +slow_query_log_use_global_control set global long_query_time=0; show variables like 'long_query_time'; Variable_name Value @@ -46,51 +34,49 @@ long_query_time 1.000000 show global variables like 'long_query_time'; Variable_name Value long_query_time 0.000000 -show global variables like 'use_global_long_query_time'; +show global variables like 'slow_query_log_use_global_control'; Variable_name Value -use_global_long_query_time OFF +slow_query_log_use_global_control INSERT INTO t VALUES (4); -# Read information about master binlog -# Sync slave(4) thread show variables like 'long_query_time'; Variable_name Value long_query_time 1.000000 show global variables like 'long_query_time'; Variable_name Value long_query_time 0.000000 -show global variables like 'use_global_long_query_time'; +show global variables like 'slow_query_log_use_global_control'; Variable_name Value -use_global_long_query_time OFF -set global use_global_long_query_time=1; +slow_query_log_use_global_control +set global slow_query_log_use_global_control='long_query_time'; show variables like 'long_query_time'; Variable_name Value long_query_time 0.000000 show global variables like 'long_query_time'; Variable_name Value long_query_time 0.000000 -show global variables like 'use_global_long_query_time'; +show global variables like 'slow_query_log_use_global_control'; Variable_name Value -use_global_long_query_time ON +slow_query_log_use_global_control long_query_time INSERT INTO t VALUES (5); -# Read information about master binlog -# Sync slave(5) thread show variables like 'long_query_time'; Variable_name Value long_query_time 0.000000 show global variables like 'long_query_time'; Variable_name Value long_query_time 0.000000 -show global variables like 'use_global_long_query_time'; +show global variables like 'slow_query_log_use_global_control'; Variable_name Value -use_global_long_query_time ON +slow_query_log_use_global_control long_query_time set global long_query_time=1; -set global use_global_long_query_time=0; +set global slow_query_log_use_global_control=''; +FLUSH LOGS; # Analyse master slow_query_log 0 0 0 0 0 +FLUSH LOGS; # Analyse slave slow_query_log 0 0 @@ -99,5 +85,5 @@ set global use_global_long_query_time=0; 1 set global log_slow_slave_statements=OFF; DROP TABLE t; -# Read information about master binlog -# Sync slave(6) thread +STOP SLAVE; +include/wait_for_slave_to_stop.inc diff --git a/mysql-test/suite/percona/percona_slow_extended-slave_statements-and-use_global_long_query_time.test b/mysql-test/suite/percona/percona_slow_extended-slave_statements-and-use_global_long_query_time.test new file mode 100644 index 00000000000..c718b2c3d28 --- /dev/null +++ b/mysql-test/suite/percona/percona_slow_extended-slave_statements-and-use_global_long_query_time.test @@ -0,0 +1,107 @@ +-- source include/have_binlog_format_mixed_or_statement.inc +-- source include/master-slave.inc + +connection master; +-- disable_warnings +DROP TABLE IF EXISTS t; +-- enable_warnings +CREATE TABLE t(id INT); + +-- disable_warnings +connection slave; +START SLAVE; +-- source include/wait_for_slave_to_start.inc +-- enable_warnings + +connection master; +INSERT INTO t VALUES (1); +sync_slave_with_master; + +connection slave; +show variables like 'log_slow_slave_statements'; +set global log_slow_slave_statements=ON; +show variables like 'log_slow_slave_statements'; + +connection master; +INSERT INTO t VALUES (2); +sync_slave_with_master; +connection slave; + +STOP SLAVE; +-- source include/wait_for_slave_to_stop.inc +START SLAVE; +-- source include/wait_for_slave_to_start.inc + +connection master; +INSERT INTO t VALUES (3); +sync_slave_with_master; + +connection slave; +show variables like 'long_query_time'; +show global variables like 'long_query_time'; +show global variables like 'slow_query_log_use_global_control'; +set global long_query_time=0; +show variables like 'long_query_time'; +show global variables like 'long_query_time'; +show global variables like 'slow_query_log_use_global_control'; + +connection master; +INSERT INTO t VALUES (4); +sync_slave_with_master; + +connection slave; +show variables like 'long_query_time'; +show global variables like 'long_query_time'; +show global variables like 'slow_query_log_use_global_control'; +set global slow_query_log_use_global_control='long_query_time'; +show variables like 'long_query_time'; +show global variables like 'long_query_time'; +show global variables like 'slow_query_log_use_global_control'; + +#-- echo # Make insert(5) on master +connection master; +INSERT INTO t VALUES (5); +sync_slave_with_master; +connection slave; +show variables like 'long_query_time'; +show global variables like 'long_query_time'; +show global variables like 'slow_query_log_use_global_control'; +set global long_query_time=1; +set global slow_query_log_use_global_control=''; + +connection master; +FLUSH LOGS; + +-- echo # Analyse master slow_query_log +let $i=5; +let $k=1; +while($i) +{ + --let grep_file = $MYSQLTEST_VARDIR/mysqld.1/data/percona_log_slow_slave_statements-master.log + --let grep_pattern = INSERT INTO t VALUES \($k\) + --source grep.inc + dec $i; + inc $k; +} + +connection slave; +FLUSH LOGS; + +-- echo # Analyse slave slow_query_log +let $i=5; +let $k=1; +while($i) +{ + --let grep_file = $MYSQLTEST_VARDIR/mysqld.2/data/percona_log_slow_slave_statements-slave.log + --let grep_pattern = INSERT INTO t VALUES \($k\) + --source grep.inc + dec $i; + inc $k; +} +set global log_slow_slave_statements=OFF; + +connection master; +DROP TABLE t; +sync_slave_with_master; +STOP SLAVE; +-- source include/wait_for_slave_to_stop.inc diff --git a/mysql-test/suite/percona/percona_log_slow_slave_statements-master.opt b/mysql-test/suite/percona/percona_slow_extended-slave_statements-master.opt index dd94fd90a57..ebf25ddd37d 100644 --- a/mysql-test/suite/percona/percona_log_slow_slave_statements-master.opt +++ b/mysql-test/suite/percona/percona_slow_extended-slave_statements-master.opt @@ -1 +1 @@ ---slow-query-log-file=percona_log_slow_slave_statements-master.log --long-query-time=0
\ No newline at end of file +--slow-query-log-file=percona_log_slow_slave_statements-master.log --long-query-time=0 diff --git a/mysql-test/suite/percona/percona_log_slow_slave_statements-slave.opt b/mysql-test/suite/percona/percona_slow_extended-slave_statements-slave.opt index e276b0bcfc8..96cd9004493 100644 --- a/mysql-test/suite/percona/percona_log_slow_slave_statements-slave.opt +++ b/mysql-test/suite/percona/percona_slow_extended-slave_statements-slave.opt @@ -1 +1 @@ ---slow-query-log-file=percona_log_slow_slave_statements-slave.log --long-query-time=0
\ No newline at end of file +--slow-query-log-file=percona_log_slow_slave_statements-slave.log --long-query-time=0 diff --git a/mysql-test/suite/percona/percona_slow_extended-slave_statements.result b/mysql-test/suite/percona/percona_slow_extended-slave_statements.result new file mode 100644 index 00000000000..0548dc370b4 --- /dev/null +++ b/mysql-test/suite/percona/percona_slow_extended-slave_statements.result @@ -0,0 +1,94 @@ +include/master-slave.inc +[connection master] +DROP TABLE IF EXISTS t; +CREATE TABLE t(id INT); +START SLAVE; +include/wait_for_slave_to_start.inc +INSERT INTO t VALUES (1); +show variables like 'log_slow_slave_statements'; +Variable_name Value +log_slow_slave_statements OFF +set global log_slow_slave_statements=ON; +show variables like 'log_slow_slave_statements'; +Variable_name Value +log_slow_slave_statements ON +INSERT INTO t VALUES (2); +show variables like 'log_slow_slave_statements'; +Variable_name Value +log_slow_slave_statements ON +set global log_slow_slave_statements=ON; +show variables like 'log_slow_slave_statements'; +Variable_name Value +log_slow_slave_statements ON +STOP SLAVE; +include/wait_for_slave_to_stop.inc +START SLAVE; +include/wait_for_slave_to_start.inc +show variables like 'log_slow_slave_statements'; +Variable_name Value +log_slow_slave_statements ON +set global log_slow_slave_statements=ON; +show variables like 'log_slow_slave_statements'; +Variable_name Value +log_slow_slave_statements ON +INSERT INTO t VALUES (3); +show variables like 'log_slow_slave_statements'; +Variable_name Value +log_slow_slave_statements ON +set global log_slow_slave_statements=OFF; +show variables like 'log_slow_slave_statements'; +Variable_name Value +log_slow_slave_statements OFF +INSERT INTO t VALUES (4); +show variables like 'log_slow_slave_statements'; +Variable_name Value +log_slow_slave_statements OFF +STOP SLAVE; +include/wait_for_slave_to_stop.inc +START SLAVE; +include/wait_for_slave_to_start.inc +show variables like 'log_slow_slave_statements'; +Variable_name Value +log_slow_slave_statements OFF +INSERT INTO t VALUES (5); +show variables like 'log_slow_slave_statements'; +Variable_name Value +log_slow_slave_statements OFF +set global log_slow_slave_statements=ON; +show variables like 'log_slow_slave_statements'; +Variable_name Value +log_slow_slave_statements ON +INSERT INTO t VALUES (6); +show variables like 'log_slow_slave_statements'; +Variable_name Value +log_slow_slave_statements ON +STOP SLAVE; +include/wait_for_slave_to_stop.inc +START SLAVE; +include/wait_for_slave_to_start.inc +show variables like 'log_slow_slave_statements'; +Variable_name Value +log_slow_slave_statements ON +INSERT INTO t VALUES (7); +FLUSH LOGS; +# Analyse master slow_query_log +1 +1 +1 +1 +1 +1 +1 +FLUSH LOGS; +# Analyse slave slow_query_log +0 +0 +1 +0 +0 +0 +1 +set global log_slow_slave_statements=OFF; +DROP TABLE t; +STOP SLAVE; +include/wait_for_slave_to_stop.inc diff --git a/mysql-test/suite/percona/percona_slow_extended-slave_statements.test b/mysql-test/suite/percona/percona_slow_extended-slave_statements.test new file mode 100644 index 00000000000..88c74bab69b --- /dev/null +++ b/mysql-test/suite/percona/percona_slow_extended-slave_statements.test @@ -0,0 +1,133 @@ +-- source include/have_binlog_format_statement.inc +-- source include/master-slave.inc + +connection master; +-- disable_warnings +DROP TABLE IF EXISTS t; +-- enable_warnings + +CREATE TABLE t(id INT); + +-- disable_warnings +connection slave; +START SLAVE; +-- source include/wait_for_slave_to_start.inc +-- enable_warnings + +connection master; +INSERT INTO t VALUES (1); +sync_slave_with_master; + +connection slave; +show variables like 'log_slow_slave_statements'; +set global log_slow_slave_statements=ON; +show variables like 'log_slow_slave_statements'; + +connection master; +INSERT INTO t VALUES (2); +sync_slave_with_master; + +connection slave; +show variables like 'log_slow_slave_statements'; +set global log_slow_slave_statements=ON; +show variables like 'log_slow_slave_statements'; + +STOP SLAVE; +-- source include/wait_for_slave_to_stop.inc +START SLAVE; +-- source include/wait_for_slave_to_start.inc + +connection slave; +show variables like 'log_slow_slave_statements'; +set global log_slow_slave_statements=ON; +show variables like 'log_slow_slave_statements'; + +connection master; +INSERT INTO t VALUES (3); +sync_slave_with_master; + +connection slave; +show variables like 'log_slow_slave_statements'; +set global log_slow_slave_statements=OFF; +show variables like 'log_slow_slave_statements'; + +connection master; +INSERT INTO t VALUES (4); +sync_slave_with_master; + +connection slave; +show variables like 'log_slow_slave_statements'; + +STOP SLAVE; +-- source include/wait_for_slave_to_stop.inc +START SLAVE; +-- source include/wait_for_slave_to_start.inc + +connection slave; +show variables like 'log_slow_slave_statements'; + +connection master; +INSERT INTO t VALUES (5); +sync_slave_with_master; + +connection slave; +show variables like 'log_slow_slave_statements'; +set global log_slow_slave_statements=ON; +show variables like 'log_slow_slave_statements'; + +connection master; +INSERT INTO t VALUES (6); +sync_slave_with_master; + +connection slave; +show variables like 'log_slow_slave_statements'; + +STOP SLAVE; +-- source include/wait_for_slave_to_stop.inc +START SLAVE; +-- source include/wait_for_slave_to_start.inc + +connection slave; +show variables like 'log_slow_slave_statements'; + +connection master; +INSERT INTO t VALUES (7); +sync_slave_with_master; + +connection master; +FLUSH LOGS; + +-- echo # Analyse master slow_query_log +let $i=7; +let $k=1; +while($i) +{ + --let grep_file = $MYSQLTEST_VARDIR/mysqld.1/data/percona_log_slow_slave_statements-master.log + --let grep_pattern = INSERT INTO t VALUES \($k\) + --source grep.inc + dec $i; + inc $k; +} + +connection slave; +FLUSH LOGS; + +-- echo # Analyse slave slow_query_log +let $i=7; +let $k=1; +while($i) +{ + --let grep_file = $MYSQLTEST_VARDIR/mysqld.2/data/percona_log_slow_slave_statements-slave.log + --let grep_pattern = INSERT INTO t VALUES \($k\) + --source grep.inc + dec $i; + inc $k; +} +set global log_slow_slave_statements=OFF; + +connection master; +DROP TABLE t; +sync_slave_with_master; + +STOP SLAVE; +-- source include/wait_for_slave_to_stop.inc diff --git a/mysql-test/suite/percona/percona_slow_extended-slow_query_log_microseconds_timestamp-cl-master.opt b/mysql-test/suite/percona/percona_slow_extended-slow_query_log_microseconds_timestamp-cl-master.opt new file mode 100644 index 00000000000..c3ebcd95326 --- /dev/null +++ b/mysql-test/suite/percona/percona_slow_extended-slow_query_log_microseconds_timestamp-cl-master.opt @@ -0,0 +1 @@ +--slow_query_log_timestamp_precision='microsecond' diff --git a/mysql-test/suite/percona/percona_slow_extended-slow_query_log_microseconds_timestamp-cl.result b/mysql-test/suite/percona/percona_slow_extended-slow_query_log_microseconds_timestamp-cl.result new file mode 100644 index 00000000000..5355922bb45 --- /dev/null +++ b/mysql-test/suite/percona/percona_slow_extended-slow_query_log_microseconds_timestamp-cl.result @@ -0,0 +1,3 @@ +show global variables like 'slow_query_log_timestamp_precision'; +Variable_name Value +slow_query_log_timestamp_precision microsecond diff --git a/mysql-test/suite/percona/percona_slow_extended-slow_query_log_microseconds_timestamp-cl.test b/mysql-test/suite/percona/percona_slow_extended-slow_query_log_microseconds_timestamp-cl.test new file mode 100644 index 00000000000..8f6291e9897 --- /dev/null +++ b/mysql-test/suite/percona/percona_slow_extended-slow_query_log_microseconds_timestamp-cl.test @@ -0,0 +1 @@ +show global variables like 'slow_query_log_timestamp_precision'; diff --git a/mysql-test/suite/percona/percona_slow_extended-slow_query_log_timestamp_always-cl-master.opt b/mysql-test/suite/percona/percona_slow_extended-slow_query_log_timestamp_always-cl-master.opt new file mode 100644 index 00000000000..233b50a1f89 --- /dev/null +++ b/mysql-test/suite/percona/percona_slow_extended-slow_query_log_timestamp_always-cl-master.opt @@ -0,0 +1 @@ +--slow_query_log_timestamp_always diff --git a/mysql-test/suite/percona/percona_slow_extended-slow_query_log_timestamp_always-cl.result b/mysql-test/suite/percona/percona_slow_extended-slow_query_log_timestamp_always-cl.result new file mode 100644 index 00000000000..13684fad10c --- /dev/null +++ b/mysql-test/suite/percona/percona_slow_extended-slow_query_log_timestamp_always-cl.result @@ -0,0 +1,3 @@ +show global variables like 'slow_query_log_timestamp_always'; +Variable_name Value +slow_query_log_timestamp_always ON diff --git a/mysql-test/suite/percona/percona_slow_extended-slow_query_log_timestamp_always-cl.test b/mysql-test/suite/percona/percona_slow_extended-slow_query_log_timestamp_always-cl.test new file mode 100644 index 00000000000..e73c4202869 --- /dev/null +++ b/mysql-test/suite/percona/percona_slow_extended-slow_query_log_timestamp_always-cl.test @@ -0,0 +1 @@ +show global variables like 'slow_query_log_timestamp_always'; diff --git a/mysql-test/suite/percona/percona_slow_query_log-control_global_slow-master.opt b/mysql-test/suite/percona/percona_slow_extended-use_global_control-master.opt index 91dd41305cd..bd62c08c475 100644 --- a/mysql-test/suite/percona/percona_slow_query_log-control_global_slow-master.opt +++ b/mysql-test/suite/percona/percona_slow_extended-use_global_control-master.opt @@ -1 +1 @@ ---slow-query-log-file=percona_slow_query_log-control_global_slow.log --long-query-time=1
\ No newline at end of file +--slow-query-log-file=percona_slow_query_log-control_global_slow.log --long-query-time=1 diff --git a/mysql-test/suite/percona/percona_slow_extended-use_global_control.result b/mysql-test/suite/percona/percona_slow_extended-use_global_control.result new file mode 100644 index 00000000000..699c95e9671 --- /dev/null +++ b/mysql-test/suite/percona/percona_slow_extended-use_global_control.result @@ -0,0 +1,12 @@ +SELECT sleep(2); +sleep(2) +0 +set global log_slow_verbosity=innodb; +set global slow_query_log_use_global_control="log_slow_verbosity,long_query_time"; +SELECT sleep(2); +sleep(2) +0 +set global slow_query_log_use_global_control=''; +set global log_slow_verbosity=''; +FLUSH LOGS; +1 diff --git a/mysql-test/suite/percona/percona_slow_extended-use_global_control.test b/mysql-test/suite/percona/percona_slow_extended-use_global_control.test new file mode 100644 index 00000000000..199b652561c --- /dev/null +++ b/mysql-test/suite/percona/percona_slow_extended-use_global_control.test @@ -0,0 +1,12 @@ +source include/have_xtradb.inc; +SELECT sleep(2); +set global log_slow_verbosity=innodb; +set global slow_query_log_use_global_control="log_slow_verbosity,long_query_time"; +SELECT sleep(2); +set global slow_query_log_use_global_control=''; +set global log_slow_verbosity=''; + +FLUSH LOGS; +--let grep_file = $MYSQLTEST_VARDIR/mysqld.1/data/percona_slow_query_log-control_global_slow.log +--let grep_pattern = No InnoDB statistics available for this query +--source grep.inc diff --git a/mysql-test/suite/percona/percona_slow_extended-use_global_long_query_time-master.opt b/mysql-test/suite/percona/percona_slow_extended-use_global_long_query_time-master.opt new file mode 100644 index 00000000000..16b6ca5b714 --- /dev/null +++ b/mysql-test/suite/percona/percona_slow_extended-use_global_long_query_time-master.opt @@ -0,0 +1 @@ +--slow-query-log-file=percona_slow_query_log-use_global_long_query_time.log --long-query-time=2 --slow_query_log_use_global_control=long_query_time --slow-query-log=OFF diff --git a/mysql-test/suite/percona/percona_slow_extended-use_global_long_query_time.result b/mysql-test/suite/percona/percona_slow_extended-use_global_long_query_time.result new file mode 100644 index 00000000000..e89edf0430f --- /dev/null +++ b/mysql-test/suite/percona/percona_slow_extended-use_global_long_query_time.result @@ -0,0 +1,46 @@ +SET GLOBAL SLOW_QUERY_LOG=ON; +SELECT sleep(1); +sleep(1) +0 +SELECT sleep(3); +sleep(3) +0 +SELECT sleep(5); +sleep(5) +0 +set global long_query_time=4; +set global slow_query_log_use_global_control='long_query_time'; +SELECT sleep(1); +sleep(1) +0 +SELECT sleep(3); +sleep(3) +0 +SELECT sleep(5); +sleep(5) +0 +set global long_query_time=2; +set global slow_query_log_use_global_control=''; +SET GLOBAL SLOW_QUERY_LOG=OFF; +FLUSH LOGS; +3 +show global variables like 'slow_query_log_use_global_control'; +Variable_name Value +slow_query_log_use_global_control +set global slow_query_log_use_global_control='long_query_time'; +show global variables like 'slow_query_log_use_global_control'; +Variable_name Value +slow_query_log_use_global_control long_query_time +set global slow_query_log_use_global_control='log_slow_filter,long_query_time'; +show global variables like 'slow_query_log_use_global_control'; +Variable_name Value +slow_query_log_use_global_control log_slow_filter,long_query_time +set global slow_query_log_use_global_control='log_slow_filter'; +show global variables like 'slow_query_log_use_global_control'; +Variable_name Value +slow_query_log_use_global_control log_slow_filter +set global slow_query_log_use_global_control=''; +show global variables like 'slow_query_log_use_global_control'; +Variable_name Value +slow_query_log_use_global_control +set global slow_query_log_use_global_control='long_query_time'; diff --git a/mysql-test/suite/percona/percona_slow_extended-use_global_long_query_time.test b/mysql-test/suite/percona/percona_slow_extended-use_global_long_query_time.test new file mode 100644 index 00000000000..61b2dabd23d --- /dev/null +++ b/mysql-test/suite/percona/percona_slow_extended-use_global_long_query_time.test @@ -0,0 +1,40 @@ +source include/have_xtradb.inc; + +SET GLOBAL SLOW_QUERY_LOG=ON; + +SELECT sleep(1); +SELECT sleep(3); +SELECT sleep(5); + +set global long_query_time=4; +set global slow_query_log_use_global_control='long_query_time'; + +SELECT sleep(1); +SELECT sleep(3); +SELECT sleep(5); + +set global long_query_time=2; +set global slow_query_log_use_global_control=''; + +SET GLOBAL SLOW_QUERY_LOG=OFF; + +FLUSH LOGS; +--let grep_file = $MYSQLTEST_VARDIR/mysqld.1/data/percona_slow_query_log-use_global_long_query_time.log +--let grep_pattern = Query_time +--source grep.inc + +show global variables like 'slow_query_log_use_global_control'; + +set global slow_query_log_use_global_control='long_query_time'; +show global variables like 'slow_query_log_use_global_control'; + +set global slow_query_log_use_global_control='log_slow_filter,long_query_time'; +show global variables like 'slow_query_log_use_global_control'; + +set global slow_query_log_use_global_control='log_slow_filter'; +show global variables like 'slow_query_log_use_global_control'; + +set global slow_query_log_use_global_control=''; +show global variables like 'slow_query_log_use_global_control'; + +set global slow_query_log_use_global_control='long_query_time'; diff --git a/mysql-test/suite/percona/percona_slow_query_log-control_global_slow.result b/mysql-test/suite/percona/percona_slow_query_log-control_global_slow.result deleted file mode 100644 index bc6ce100b35..00000000000 --- a/mysql-test/suite/percona/percona_slow_query_log-control_global_slow.result +++ /dev/null @@ -1,12 +0,0 @@ -SELECT sleep(2); -sleep(2) -0 -set global log_slow_verbosity=innodb; -set global use_global_log_slow_control="log_slow_verbosity,long_query_time"; -SELECT sleep(2); -sleep(2) -0 -set global use_global_log_slow_control=none; -set global log_slow_verbosity=microtime; -cat MYSQLD_DATADIR/percona_slow_query_log-control_global_slow.log | grep -c "No InnoDB statistics available for this query" -1 diff --git a/mysql-test/suite/percona/percona_slow_query_log-control_global_slow.test b/mysql-test/suite/percona/percona_slow_query_log-control_global_slow.test deleted file mode 100644 index 1c3dc937937..00000000000 --- a/mysql-test/suite/percona/percona_slow_query_log-control_global_slow.test +++ /dev/null @@ -1,14 +0,0 @@ ---source include/not_windows.inc - -source include/have_innodb.inc; -SELECT sleep(2); -set global log_slow_verbosity=innodb; -set global use_global_log_slow_control="log_slow_verbosity,long_query_time"; -SELECT sleep(2); -set global use_global_log_slow_control=none; -set global log_slow_verbosity=microtime; -let $MYSQLD_DATADIR= `select @@datadir`; -let $cmd = cat $MYSQLD_DATADIR/percona_slow_query_log-control_global_slow.log | grep -c "No InnoDB statistics available for this query"; ---replace_result $MYSQLD_DATADIR MYSQLD_DATADIR -exec echo '$cmd'; -exec $cmd; diff --git a/mysql-test/suite/percona/percona_slow_query_log-log_slow_verbosity.result b/mysql-test/suite/percona/percona_slow_query_log-log_slow_verbosity.result deleted file mode 100644 index ff42937fa4a..00000000000 --- a/mysql-test/suite/percona/percona_slow_query_log-log_slow_verbosity.result +++ /dev/null @@ -1,9 +0,0 @@ -SELECT sleep(2); -sleep(2) -0 -set log_slow_verbosity=innodb; -SELECT sleep(2); -sleep(2) -0 -cat MYSQLD_DATADIR/percona_slow_query_log-log_slow_verbosity.log | grep -c "No InnoDB statistics available for this query" -1 diff --git a/mysql-test/suite/percona/percona_slow_query_log-log_slow_verbosity.test b/mysql-test/suite/percona/percona_slow_query_log-log_slow_verbosity.test deleted file mode 100644 index d1dc324fced..00000000000 --- a/mysql-test/suite/percona/percona_slow_query_log-log_slow_verbosity.test +++ /dev/null @@ -1,15 +0,0 @@ --- source include/not_windows.inc - -source include/have_innodb.inc; - -SELECT sleep(2); - -set log_slow_verbosity=innodb; - -SELECT sleep(2); - -let $MYSQLD_DATADIR= `select @@datadir`; -let $cmd = cat $MYSQLD_DATADIR/percona_slow_query_log-log_slow_verbosity.log | grep -c "No InnoDB statistics available for this query"; ---replace_result $MYSQLD_DATADIR MYSQLD_DATADIR -exec echo '$cmd'; -exec $cmd; diff --git a/mysql-test/suite/percona/percona_slow_query_log-long_query_time.result b/mysql-test/suite/percona/percona_slow_query_log-long_query_time.result deleted file mode 100644 index 03f8745ca62..00000000000 --- a/mysql-test/suite/percona/percona_slow_query_log-long_query_time.result +++ /dev/null @@ -1,21 +0,0 @@ -SELECT sleep(1); -sleep(1) -0 -SELECT sleep(6); -sleep(6) -0 -SELECT sleep(10); -sleep(10) -0 -set long_query_time=8; -SELECT sleep(1); -sleep(1) -0 -SELECT sleep(6); -sleep(6) -0 -SELECT sleep(12); -sleep(12) -0 -cat MYSQLD_DATADIR/percona_slow_query_log-long_query_time.log | grep -c Query_time -3 diff --git a/mysql-test/suite/percona/percona_slow_query_log-long_query_time.test b/mysql-test/suite/percona/percona_slow_query_log-long_query_time.test deleted file mode 100644 index 4161690e2ef..00000000000 --- a/mysql-test/suite/percona/percona_slow_query_log-long_query_time.test +++ /dev/null @@ -1,18 +0,0 @@ -source include/not_windows.inc; -source include/have_innodb.inc; - -SELECT sleep(1); -SELECT sleep(6); -SELECT sleep(10); - -set long_query_time=8; - -SELECT sleep(1); -SELECT sleep(6); -SELECT sleep(12); - -let $MYSQLD_DATADIR= `select @@datadir`; -let $cmd = cat $MYSQLD_DATADIR/percona_slow_query_log-long_query_time.log | grep -c Query_time; ---replace_result $MYSQLD_DATADIR MYSQLD_DATADIR -exec echo '$cmd'; -exec $cmd; diff --git a/mysql-test/suite/percona/percona_slow_query_log-microseconds_in_slow_query_log.result b/mysql-test/suite/percona/percona_slow_query_log-microseconds_in_slow_query_log.result deleted file mode 100644 index fbfc954481e..00000000000 --- a/mysql-test/suite/percona/percona_slow_query_log-microseconds_in_slow_query_log.result +++ /dev/null @@ -1,12 +0,0 @@ -SELECT sleep(2); -sleep(2) -0 -set global slow_query_log_microseconds_timestamp=ON; -SELECT sleep(2); -sleep(2) -0 -set global slow_query_log_microseconds_timestamp=OFF; -cat MYSQLD_DATADIR/percona_slow_query_log-microseconds_in_slow_query_log.log | grep -E -c '# Time: [0-9]+[ ]+[0-9]+:[0-\9]+:[0-9]+.[0-9]+' -1 -cat MYSQLD_DATADIR/percona_slow_query_log-microseconds_in_slow_query_log.log | grep -E -c '# Time: [0-9]+[ ]+[0-9]+:[0-\9]+:[0-9]+' -2 diff --git a/mysql-test/suite/percona/percona_slow_query_log-microseconds_in_slow_query_log.test b/mysql-test/suite/percona/percona_slow_query_log-microseconds_in_slow_query_log.test deleted file mode 100644 index bceada68d79..00000000000 --- a/mysql-test/suite/percona/percona_slow_query_log-microseconds_in_slow_query_log.test +++ /dev/null @@ -1,21 +0,0 @@ -source include/not_windows.inc; -source include/have_innodb.inc; - -SELECT sleep(2); - -set global slow_query_log_microseconds_timestamp=ON; - -SELECT sleep(2); - -set global slow_query_log_microseconds_timestamp=OFF; - -let $MYSQLD_DATADIR= `select @@datadir`; -let $cmd = cat $MYSQLD_DATADIR/percona_slow_query_log-microseconds_in_slow_query_log.log | grep -E -c '# Time: [0-9]+[ ]+[0-9]+:[0-\9]+:[0-9]+.[0-9]+'; ---replace_result $MYSQLD_DATADIR MYSQLD_DATADIR -exec echo "$cmd"; -exec $cmd; - -let $cmd = cat $MYSQLD_DATADIR/percona_slow_query_log-microseconds_in_slow_query_log.log | grep -E -c '# Time: [0-9]+[ ]+[0-9]+:[0-\9]+:[0-9]+'; ---replace_result $MYSQLD_DATADIR MYSQLD_DATADIR -exec echo "$cmd"; -exec $cmd; diff --git a/mysql-test/suite/percona/percona_slow_query_log-use_global_long_query_time-master.opt b/mysql-test/suite/percona/percona_slow_query_log-use_global_long_query_time-master.opt deleted file mode 100644 index e2f3b6f2041..00000000000 --- a/mysql-test/suite/percona/percona_slow_query_log-use_global_long_query_time-master.opt +++ /dev/null @@ -1 +0,0 @@ ---slow-query-log-file=percona_slow_query_log-use_global_long_query_time.log --long-query-time=2
\ No newline at end of file diff --git a/mysql-test/suite/percona/percona_slow_query_log-use_global_long_query_time.result b/mysql-test/suite/percona/percona_slow_query_log-use_global_long_query_time.result deleted file mode 100644 index e294525fdd2..00000000000 --- a/mysql-test/suite/percona/percona_slow_query_log-use_global_long_query_time.result +++ /dev/null @@ -1,59 +0,0 @@ -SELECT sleep(1); -sleep(1) -0 -SELECT sleep(3); -sleep(3) -0 -SELECT sleep(5); -sleep(5) -0 -set global long_query_time=4; -set global use_global_long_query_time=1; -SELECT sleep(1); -sleep(1) -0 -SELECT sleep(3); -sleep(3) -0 -SELECT sleep(5); -sleep(5) -0 -set global long_query_time=2; -set global use_global_long_query_time=0; -cat MYSQLD_DATADIR/percona_slow_query_log-use_global_long_query_time.log | grep -c Query_time -3 -show global variables like 'use_global_log_slow_control'; -Variable_name Value -use_global_log_slow_control none -show global variables like 'use_global_long_query_time'; -Variable_name Value -use_global_long_query_time OFF -set global use_global_log_slow_control = long_query_time; -show global variables like 'use_global_log_slow_control'; -Variable_name Value -use_global_log_slow_control long_query_time -show global variables like 'use_global_long_query_time'; -Variable_name Value -use_global_long_query_time ON -set global use_global_log_slow_control = log_slow_filter; -show global variables like 'use_global_log_slow_control'; -Variable_name Value -use_global_log_slow_control log_slow_filter -show global variables like 'use_global_long_query_time'; -Variable_name Value -use_global_long_query_time OFF -set global use_global_long_query_time = ON; -show global variables like 'use_global_log_slow_control'; -Variable_name Value -use_global_log_slow_control log_slow_filter,long_query_time -show global variables like 'use_global_long_query_time'; -Variable_name Value -use_global_long_query_time ON -set global use_global_long_query_time = OFF; -show global variables like 'use_global_log_slow_control'; -Variable_name Value -use_global_log_slow_control log_slow_filter -show global variables like 'use_global_long_query_time'; -Variable_name Value -use_global_long_query_time OFF -set global use_global_log_slow_control = none; diff --git a/mysql-test/suite/percona/percona_slow_query_log-use_global_long_query_time.test b/mysql-test/suite/percona/percona_slow_query_log-use_global_long_query_time.test deleted file mode 100644 index da627ae72b0..00000000000 --- a/mysql-test/suite/percona/percona_slow_query_log-use_global_long_query_time.test +++ /dev/null @@ -1,43 +0,0 @@ -source include/not_windows.inc; -source include/have_innodb.inc; - -SELECT sleep(1); -SELECT sleep(3); -SELECT sleep(5); - -set global long_query_time=4; -set global use_global_long_query_time=1; - -SELECT sleep(1); -SELECT sleep(3); -SELECT sleep(5); - -set global long_query_time=2; -set global use_global_long_query_time=0; - -let $MYSQLD_DATADIR= `select @@datadir`; -let $cmd = cat $MYSQLD_DATADIR/percona_slow_query_log-use_global_long_query_time.log | grep -c Query_time; ---replace_result $MYSQLD_DATADIR MYSQLD_DATADIR -exec echo '$cmd'; -exec $cmd; - -show global variables like 'use_global_log_slow_control'; -show global variables like 'use_global_long_query_time'; - -set global use_global_log_slow_control = long_query_time; -show global variables like 'use_global_log_slow_control'; -show global variables like 'use_global_long_query_time'; - -set global use_global_log_slow_control = log_slow_filter; -show global variables like 'use_global_log_slow_control'; -show global variables like 'use_global_long_query_time'; - -set global use_global_long_query_time = ON; -show global variables like 'use_global_log_slow_control'; -show global variables like 'use_global_long_query_time'; - -set global use_global_long_query_time = OFF; -show global variables like 'use_global_log_slow_control'; -show global variables like 'use_global_long_query_time'; - -set global use_global_log_slow_control = none; diff --git a/mysql-test/suite/percona/percona_sql_no_fcache.test b/mysql-test/suite/percona/percona_sql_no_fcache.test index da0c2ecef7d..1ed8be2196b 100644 --- a/mysql-test/suite/percona/percona_sql_no_fcache.test +++ b/mysql-test/suite/percona/percona_sql_no_fcache.test @@ -8,4 +8,4 @@ insert into t values (1),(2),(3); SELECT SQL_NO_FCACHE SLEEP(0); SELECT /*!40001 SQL_NO_CACHE */ /*!50084 SQL_NO_FCACHE */ * FROM t; -DROP TABLE t;
\ No newline at end of file +DROP TABLE t; diff --git a/mysql-test/suite/percona/percona_status_wait_query_cache_mutex.result b/mysql-test/suite/percona/percona_status_wait_query_cache_mutex.result index 348dcef4d30..f951428abc7 100644 --- a/mysql-test/suite/percona/percona_status_wait_query_cache_mutex.result +++ b/mysql-test/suite/percona/percona_status_wait_query_cache_mutex.result @@ -18,10 +18,10 @@ SET SESSION debug="+d,status_wait_query_cache_mutex_sleep"; SELECT number from t where id > 0; SET SESSION debug="+d,status_wait_query_cache_mutex_sleep"; SHOW PROCESSLIST; -Id User Host db Command Time State Info -Id root localhost test Sleep Time NULL -Id root localhost test Query Time Waiting on query cache mutex SELECT number from t where id > 0 -Id root localhost test Query Time Waiting on query cache mutex SELECT number from t where id > 0 -Id root localhost test Query Time NULL SHOW PROCESSLIST +Id User Host db Command Time State Info Rows_sent Rows_examined Rows_read +Id root localhost test Sleep Time NULL Rows_sent Rows_examined Rows_read +Id root localhost test Query Time Waiting on query cache mutex SELECT number from t where id > 0 Rows_sent Rows_examined Rows_read +Id root localhost test Query Time Waiting on query cache mutex SELECT number from t where id > 0 Rows_sent Rows_examined Rows_read +Id root localhost test Query Time NULL SHOW PROCESSLIST Rows_sent Rows_examined Rows_read DROP TABLE t; set GLOBAL query_cache_size=0; diff --git a/mysql-test/suite/percona/percona_status_wait_query_cache_mutex.test b/mysql-test/suite/percona/percona_status_wait_query_cache_mutex.test index 64a9fe7db71..35e2d0ac549 100644 --- a/mysql-test/suite/percona/percona_status_wait_query_cache_mutex.test +++ b/mysql-test/suite/percona/percona_status_wait_query_cache_mutex.test @@ -30,8 +30,8 @@ SLEEP 1.0; --connection conn2 --error 0, ER_UNKNOWN_SYSTEM_VARIABLE SET SESSION debug="+d,status_wait_query_cache_mutex_sleep"; ---replace_column 1 Id 6 Time +--replace_column 1 Id 6 Time 9 Rows_sent 10 Rows_examined 11 Rows_read SHOW PROCESSLIST; DROP TABLE t; -set GLOBAL query_cache_size=0;
\ No newline at end of file +set GLOBAL query_cache_size=0; diff --git a/mysql-test/suite/percona/percona_suppress_log_warning_1592.result b/mysql-test/suite/percona/percona_suppress_log_warning_1592.result deleted file mode 100644 index 4715499b08f..00000000000 --- a/mysql-test/suite/percona/percona_suppress_log_warning_1592.result +++ /dev/null @@ -1,28 +0,0 @@ -SET @old_log_warnings = @@log_warnings; -SET @old_suppress_log_warning_1592 = @@suppress_log_warning_1592; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 (a VARCHAR(36), b VARCHAR(20)); -SET GLOBAL SUPPRESS_LOG_WARNING_1592 = 0; -SET GLOBAL LOG_WARNINGS = 0; -INSERT INTO t1 VALUES(UUID(), 'suppress_1592'); -Warnings: -Note 1592 Statement may not be safe to log in statement format. -SET GLOBAL LOG_WARNINGS = 1; -INSERT INTO t1 VALUES(UUID(), 'suppress_1592'); -Warnings: -Note 1592 Statement may not be safe to log in statement format. -SET GLOBAL SUPPRESS_LOG_WARNING_1592 = 1; -SET GLOBAL LOG_WARNINGS = 0; -INSERT INTO t1 VALUES(UUID(), 'suppress_1592'); -Warnings: -Note 1592 Statement may not be safe to log in statement format. -SET GLOBAL LOG_WARNINGS = 1; -INSERT INTO t1 VALUES(UUID(), 'suppress_1592'); -Warnings: -Note 1592 Statement may not be safe to log in statement format. -DROP TABLE t1; -SET GLOBAL log_warnings = @old_log_warnings; -SET GLOBAL suppress_log_warning_1592 = @old_suppress_log_warning_1592; -# Count the number of times the "Unsafe" message was printed -# to the error log. -Occurrences: 1 diff --git a/mysql-test/suite/percona/percona_xtradb_bug317074.result b/mysql-test/suite/percona/percona_xtradb_bug317074.result index 82a98844652..7c1876fb7bf 100644 --- a/mysql-test/suite/percona/percona_xtradb_bug317074.result +++ b/mysql-test/suite/percona/percona_xtradb_bug317074.result @@ -1,4 +1,5 @@ SET @old_innodb_file_format=@@innodb_file_format; +SET @old_innodb_file_format_max=@@innodb_file_format_max; SET @old_innodb_file_per_table=@@innodb_file_per_table; SET GLOBAL innodb_file_format='Barracuda'; SET GLOBAL innodb_file_per_table=ON; diff --git a/mysql-test/suite/percona/percona_xtradb_bug317074.test b/mysql-test/suite/percona/percona_xtradb_bug317074.test index 029e0f8fcdf..5f9db073060 100644 --- a/mysql-test/suite/percona/percona_xtradb_bug317074.test +++ b/mysql-test/suite/percona/percona_xtradb_bug317074.test @@ -1,8 +1,8 @@ -- source include/have_xtradb.inc SET @old_innodb_file_format=@@innodb_file_format; +SET @old_innodb_file_format_max=@@innodb_file_format_max; SET @old_innodb_file_per_table=@@innodb_file_per_table; -let $innodb_file_format_check_orig=`select @@innodb_file_format_check`; SET GLOBAL innodb_file_format='Barracuda'; SET GLOBAL innodb_file_per_table=ON; @@ -44,5 +44,5 @@ ALTER TABLE test1 ENGINE=MyISAM; DROP TABLE test1; SET GLOBAL innodb_file_format=@old_innodb_file_format; +SET GLOBAL innodb_file_format_max=@old_innodb_file_format_max; SET GLOBAL innodb_file_per_table=@old_innodb_file_per_table; -eval set global innodb_file_format_check=$innodb_file_format_check_orig; diff --git a/mysql-test/suite/percona/userstat_bug602047.result b/mysql-test/suite/percona/userstat_bug602047.result new file mode 100644 index 00000000000..966439b817d --- /dev/null +++ b/mysql-test/suite/percona/userstat_bug602047.result @@ -0,0 +1,15 @@ +DROP TABLE IF EXISTS t1; +SET GLOBAL userstat=ON; +CREATE TABLE t1 ( id int(10), PRIMARY KEY (id)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); +SELECT COUNT(*) FROM t1; +COUNT(*) +10 +SELECT ROWS_READ FROM information_schema.table_statistics WHERE TABLE_NAME='t1'; +ROWS_READ +10 +SELECT ROWS_READ FROM information_schema.index_statistics WHERE TABLE_NAME='t1'; +ROWS_READ +10 +SET GLOBAL userstat=OFF; +DROP TABLE t1; diff --git a/mysql-test/suite/percona/userstat_bug602047.test b/mysql-test/suite/percona/userstat_bug602047.test new file mode 100644 index 00000000000..31fc36b80e2 --- /dev/null +++ b/mysql-test/suite/percona/userstat_bug602047.test @@ -0,0 +1,12 @@ +--source include/have_xtradb.inc +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings +SET GLOBAL userstat=ON; +CREATE TABLE t1 ( id int(10), PRIMARY KEY (id)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); +SELECT COUNT(*) FROM t1; +SELECT ROWS_READ FROM information_schema.table_statistics WHERE TABLE_NAME='t1'; +SELECT ROWS_READ FROM information_schema.index_statistics WHERE TABLE_NAME='t1'; +SET GLOBAL userstat=OFF; +DROP TABLE t1; diff --git a/mysql-test/suite/sys_vars/r/innodb_adaptive_flushing_method_basic.result b/mysql-test/suite/sys_vars/r/innodb_adaptive_flushing_method_basic.result new file mode 100644 index 00000000000..d9d067c2cf9 --- /dev/null +++ b/mysql-test/suite/sys_vars/r/innodb_adaptive_flushing_method_basic.result @@ -0,0 +1 @@ +XtraDB extension diff --git a/mysql-test/suite/sys_vars/r/innodb_adaptive_hash_index_partitions_basic.result b/mysql-test/suite/sys_vars/r/innodb_adaptive_hash_index_partitions_basic.result new file mode 100644 index 00000000000..d9d067c2cf9 --- /dev/null +++ b/mysql-test/suite/sys_vars/r/innodb_adaptive_hash_index_partitions_basic.result @@ -0,0 +1 @@ +XtraDB extension diff --git a/mysql-test/suite/sys_vars/r/innodb_buffer_pool_restore_at_startup_basic.result b/mysql-test/suite/sys_vars/r/innodb_buffer_pool_restore_at_startup_basic.result new file mode 100644 index 00000000000..d9d067c2cf9 --- /dev/null +++ b/mysql-test/suite/sys_vars/r/innodb_buffer_pool_restore_at_startup_basic.result @@ -0,0 +1 @@ +XtraDB extension diff --git a/mysql-test/suite/sys_vars/r/innodb_buffer_pool_shm_checksum_basic.result b/mysql-test/suite/sys_vars/r/innodb_buffer_pool_shm_checksum_basic.result new file mode 100644 index 00000000000..d9d067c2cf9 --- /dev/null +++ b/mysql-test/suite/sys_vars/r/innodb_buffer_pool_shm_checksum_basic.result @@ -0,0 +1 @@ +XtraDB extension diff --git a/mysql-test/suite/sys_vars/r/innodb_buffer_pool_shm_key_basic.result b/mysql-test/suite/sys_vars/r/innodb_buffer_pool_shm_key_basic.result new file mode 100644 index 00000000000..d9d067c2cf9 --- /dev/null +++ b/mysql-test/suite/sys_vars/r/innodb_buffer_pool_shm_key_basic.result @@ -0,0 +1 @@ +XtraDB extension diff --git a/mysql-test/suite/sys_vars/r/innodb_checkpoint_age_target_basic.result b/mysql-test/suite/sys_vars/r/innodb_checkpoint_age_target_basic.result new file mode 100644 index 00000000000..d9d067c2cf9 --- /dev/null +++ b/mysql-test/suite/sys_vars/r/innodb_checkpoint_age_target_basic.result @@ -0,0 +1 @@ +XtraDB extension diff --git a/mysql-test/suite/sys_vars/r/innodb_corrupt_table_action_basic.result b/mysql-test/suite/sys_vars/r/innodb_corrupt_table_action_basic.result new file mode 100644 index 00000000000..d9d067c2cf9 --- /dev/null +++ b/mysql-test/suite/sys_vars/r/innodb_corrupt_table_action_basic.result @@ -0,0 +1 @@ +XtraDB extension diff --git a/mysql-test/suite/sys_vars/r/innodb_dict_size_limit_basic.result b/mysql-test/suite/sys_vars/r/innodb_dict_size_limit_basic.result new file mode 100644 index 00000000000..d9d067c2cf9 --- /dev/null +++ b/mysql-test/suite/sys_vars/r/innodb_dict_size_limit_basic.result @@ -0,0 +1 @@ +XtraDB extension diff --git a/mysql-test/suite/sys_vars/r/innodb_doublewrite_file_basic.result b/mysql-test/suite/sys_vars/r/innodb_doublewrite_file_basic.result new file mode 100644 index 00000000000..d9d067c2cf9 --- /dev/null +++ b/mysql-test/suite/sys_vars/r/innodb_doublewrite_file_basic.result @@ -0,0 +1 @@ +XtraDB extension diff --git a/mysql-test/suite/sys_vars/r/innodb_fast_checksum_basic.result b/mysql-test/suite/sys_vars/r/innodb_fast_checksum_basic.result new file mode 100644 index 00000000000..d9d067c2cf9 --- /dev/null +++ b/mysql-test/suite/sys_vars/r/innodb_fast_checksum_basic.result @@ -0,0 +1 @@ +XtraDB extension diff --git a/mysql-test/suite/sys_vars/r/innodb_file_format_max_basic.result b/mysql-test/suite/sys_vars/r/innodb_file_format_max_basic.result new file mode 100644 index 00000000000..d9d067c2cf9 --- /dev/null +++ b/mysql-test/suite/sys_vars/r/innodb_file_format_max_basic.result @@ -0,0 +1 @@ +XtraDB extension diff --git a/mysql-test/suite/sys_vars/r/innodb_flush_log_at_trx_commit_basic.result b/mysql-test/suite/sys_vars/r/innodb_flush_log_at_trx_commit_basic.result index eabafb26ccb..441fb4cd362 100644 --- a/mysql-test/suite/sys_vars/r/innodb_flush_log_at_trx_commit_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_flush_log_at_trx_commit_basic.result @@ -9,11 +9,6 @@ SELECT @@global.innodb_flush_log_at_trx_commit; @@global.innodb_flush_log_at_trx_commit 1 '#---------------------FN_DYNVARS_046_02-------------------------#' -SET innodb_flush_log_at_trx_commit = 1; -ERROR HY000: Variable 'innodb_flush_log_at_trx_commit' is a GLOBAL variable and should be set with SET GLOBAL -SELECT @@innodb_flush_log_at_trx_commit; -@@innodb_flush_log_at_trx_commit -1 SELECT local.innodb_flush_log_at_trx_commit; ERROR 42S02: Unknown table 'local' in field list SET global innodb_flush_log_at_trx_commit = 0; diff --git a/mysql-test/suite/sys_vars/r/innodb_flush_neighbor_pages_basic.result b/mysql-test/suite/sys_vars/r/innodb_flush_neighbor_pages_basic.result new file mode 100644 index 00000000000..d9d067c2cf9 --- /dev/null +++ b/mysql-test/suite/sys_vars/r/innodb_flush_neighbor_pages_basic.result @@ -0,0 +1 @@ +XtraDB extension diff --git a/mysql-test/suite/sys_vars/r/innodb_ibuf_accel_rate_basic.result b/mysql-test/suite/sys_vars/r/innodb_ibuf_accel_rate_basic.result new file mode 100644 index 00000000000..d9d067c2cf9 --- /dev/null +++ b/mysql-test/suite/sys_vars/r/innodb_ibuf_accel_rate_basic.result @@ -0,0 +1 @@ +XtraDB extension diff --git a/mysql-test/suite/sys_vars/r/innodb_ibuf_active_contract_basic.result b/mysql-test/suite/sys_vars/r/innodb_ibuf_active_contract_basic.result new file mode 100644 index 00000000000..d9d067c2cf9 --- /dev/null +++ b/mysql-test/suite/sys_vars/r/innodb_ibuf_active_contract_basic.result @@ -0,0 +1 @@ +XtraDB extension diff --git a/mysql-test/suite/sys_vars/r/innodb_ibuf_max_size_basic.result b/mysql-test/suite/sys_vars/r/innodb_ibuf_max_size_basic.result new file mode 100644 index 00000000000..d9d067c2cf9 --- /dev/null +++ b/mysql-test/suite/sys_vars/r/innodb_ibuf_max_size_basic.result @@ -0,0 +1 @@ +XtraDB extension diff --git a/mysql-test/suite/sys_vars/r/innodb_import_table_from_xtrabackup_basic.result b/mysql-test/suite/sys_vars/r/innodb_import_table_from_xtrabackup_basic.result new file mode 100644 index 00000000000..d9d067c2cf9 --- /dev/null +++ b/mysql-test/suite/sys_vars/r/innodb_import_table_from_xtrabackup_basic.result @@ -0,0 +1 @@ +XtraDB extension diff --git a/mysql-test/suite/sys_vars/r/innodb_large_prefix_basic.result b/mysql-test/suite/sys_vars/r/innodb_large_prefix_basic.result new file mode 100644 index 00000000000..d9d067c2cf9 --- /dev/null +++ b/mysql-test/suite/sys_vars/r/innodb_large_prefix_basic.result @@ -0,0 +1 @@ +XtraDB extension diff --git a/mysql-test/suite/sys_vars/r/innodb_lazy_drop_table_basic.result b/mysql-test/suite/sys_vars/r/innodb_lazy_drop_table_basic.result new file mode 100644 index 00000000000..d9d067c2cf9 --- /dev/null +++ b/mysql-test/suite/sys_vars/r/innodb_lazy_drop_table_basic.result @@ -0,0 +1 @@ +XtraDB extension diff --git a/mysql-test/suite/sys_vars/r/innodb_log_block_size_basic.result b/mysql-test/suite/sys_vars/r/innodb_log_block_size_basic.result new file mode 100644 index 00000000000..d9d067c2cf9 --- /dev/null +++ b/mysql-test/suite/sys_vars/r/innodb_log_block_size_basic.result @@ -0,0 +1 @@ +XtraDB extension diff --git a/mysql-test/suite/sys_vars/r/innodb_page_size_basic.result b/mysql-test/suite/sys_vars/r/innodb_page_size_basic.result new file mode 100644 index 00000000000..d9d067c2cf9 --- /dev/null +++ b/mysql-test/suite/sys_vars/r/innodb_page_size_basic.result @@ -0,0 +1 @@ +XtraDB extension diff --git a/mysql-test/suite/sys_vars/r/innodb_read_ahead_basic.result b/mysql-test/suite/sys_vars/r/innodb_read_ahead_basic.result new file mode 100644 index 00000000000..d9d067c2cf9 --- /dev/null +++ b/mysql-test/suite/sys_vars/r/innodb_read_ahead_basic.result @@ -0,0 +1 @@ +XtraDB extension diff --git a/mysql-test/suite/sys_vars/r/innodb_recovery_stats_basic.result b/mysql-test/suite/sys_vars/r/innodb_recovery_stats_basic.result new file mode 100644 index 00000000000..d9d067c2cf9 --- /dev/null +++ b/mysql-test/suite/sys_vars/r/innodb_recovery_stats_basic.result @@ -0,0 +1 @@ +XtraDB extension diff --git a/mysql-test/suite/sys_vars/r/innodb_recovery_update_relay_log_basic.result b/mysql-test/suite/sys_vars/r/innodb_recovery_update_relay_log_basic.result new file mode 100644 index 00000000000..d9d067c2cf9 --- /dev/null +++ b/mysql-test/suite/sys_vars/r/innodb_recovery_update_relay_log_basic.result @@ -0,0 +1 @@ +XtraDB extension diff --git a/mysql-test/suite/sys_vars/r/innodb_rollback_segments_basic.result b/mysql-test/suite/sys_vars/r/innodb_rollback_segments_basic.result new file mode 100644 index 00000000000..d9d067c2cf9 --- /dev/null +++ b/mysql-test/suite/sys_vars/r/innodb_rollback_segments_basic.result @@ -0,0 +1 @@ +XtraDB extension diff --git a/mysql-test/suite/sys_vars/r/innodb_show_locks_held_basic.result b/mysql-test/suite/sys_vars/r/innodb_show_locks_held_basic.result new file mode 100644 index 00000000000..d9d067c2cf9 --- /dev/null +++ b/mysql-test/suite/sys_vars/r/innodb_show_locks_held_basic.result @@ -0,0 +1 @@ +XtraDB extension diff --git a/mysql-test/suite/sys_vars/r/innodb_show_verbose_locks_basic.result b/mysql-test/suite/sys_vars/r/innodb_show_verbose_locks_basic.result new file mode 100644 index 00000000000..d9d067c2cf9 --- /dev/null +++ b/mysql-test/suite/sys_vars/r/innodb_show_verbose_locks_basic.result @@ -0,0 +1 @@ +XtraDB extension diff --git a/mysql-test/suite/sys_vars/r/innodb_stats_auto_update_basic.result b/mysql-test/suite/sys_vars/r/innodb_stats_auto_update_basic.result new file mode 100644 index 00000000000..d9d067c2cf9 --- /dev/null +++ b/mysql-test/suite/sys_vars/r/innodb_stats_auto_update_basic.result @@ -0,0 +1 @@ +XtraDB extension diff --git a/mysql-test/suite/sys_vars/r/innodb_stats_method_basic.result b/mysql-test/suite/sys_vars/r/innodb_stats_method_basic.result new file mode 100644 index 00000000000..d9d067c2cf9 --- /dev/null +++ b/mysql-test/suite/sys_vars/r/innodb_stats_method_basic.result @@ -0,0 +1 @@ +XtraDB extension diff --git a/mysql-test/suite/sys_vars/r/innodb_stats_update_need_lock_basic.result b/mysql-test/suite/sys_vars/r/innodb_stats_update_need_lock_basic.result new file mode 100644 index 00000000000..d9d067c2cf9 --- /dev/null +++ b/mysql-test/suite/sys_vars/r/innodb_stats_update_need_lock_basic.result @@ -0,0 +1 @@ +XtraDB extension diff --git a/mysql-test/suite/sys_vars/r/innodb_thread_concurrency_timer_based_basic.result b/mysql-test/suite/sys_vars/r/innodb_thread_concurrency_timer_based_basic.result new file mode 100644 index 00000000000..d9d067c2cf9 --- /dev/null +++ b/mysql-test/suite/sys_vars/r/innodb_thread_concurrency_timer_based_basic.result @@ -0,0 +1 @@ +XtraDB extension diff --git a/mysql-test/suite/sys_vars/r/innodb_use_global_flush_log_at_trx_commit_basic.result b/mysql-test/suite/sys_vars/r/innodb_use_global_flush_log_at_trx_commit_basic.result new file mode 100644 index 00000000000..d9d067c2cf9 --- /dev/null +++ b/mysql-test/suite/sys_vars/r/innodb_use_global_flush_log_at_trx_commit_basic.result @@ -0,0 +1 @@ +XtraDB extension diff --git a/mysql-test/suite/sys_vars/r/innodb_use_sys_stats_table_basic.result b/mysql-test/suite/sys_vars/r/innodb_use_sys_stats_table_basic.result new file mode 100644 index 00000000000..d9d067c2cf9 --- /dev/null +++ b/mysql-test/suite/sys_vars/r/innodb_use_sys_stats_table_basic.result @@ -0,0 +1 @@ +XtraDB extension diff --git a/mysql-test/suite/sys_vars/t/innodb_adaptive_flushing_method_basic.test b/mysql-test/suite/sys_vars/t/innodb_adaptive_flushing_method_basic.test new file mode 100644 index 00000000000..00aa476e8d2 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/innodb_adaptive_flushing_method_basic.test @@ -0,0 +1 @@ +--echo XtraDB extension diff --git a/mysql-test/suite/sys_vars/t/innodb_adaptive_hash_index_partitions_basic.test b/mysql-test/suite/sys_vars/t/innodb_adaptive_hash_index_partitions_basic.test new file mode 100644 index 00000000000..00aa476e8d2 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/innodb_adaptive_hash_index_partitions_basic.test @@ -0,0 +1 @@ +--echo XtraDB extension diff --git a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_restore_at_startup_basic.test b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_restore_at_startup_basic.test new file mode 100644 index 00000000000..00aa476e8d2 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_restore_at_startup_basic.test @@ -0,0 +1 @@ +--echo XtraDB extension diff --git a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_shm_checksum_basic.test b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_shm_checksum_basic.test new file mode 100644 index 00000000000..00aa476e8d2 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_shm_checksum_basic.test @@ -0,0 +1 @@ +--echo XtraDB extension diff --git a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_shm_key_basic.test b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_shm_key_basic.test new file mode 100644 index 00000000000..00aa476e8d2 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_shm_key_basic.test @@ -0,0 +1 @@ +--echo XtraDB extension diff --git a/mysql-test/suite/sys_vars/t/innodb_checkpoint_age_target_basic.test b/mysql-test/suite/sys_vars/t/innodb_checkpoint_age_target_basic.test new file mode 100644 index 00000000000..00aa476e8d2 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/innodb_checkpoint_age_target_basic.test @@ -0,0 +1 @@ +--echo XtraDB extension diff --git a/mysql-test/suite/sys_vars/t/innodb_corrupt_table_action_basic.test b/mysql-test/suite/sys_vars/t/innodb_corrupt_table_action_basic.test new file mode 100644 index 00000000000..00aa476e8d2 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/innodb_corrupt_table_action_basic.test @@ -0,0 +1 @@ +--echo XtraDB extension diff --git a/mysql-test/suite/sys_vars/t/innodb_dict_size_limit_basic.test b/mysql-test/suite/sys_vars/t/innodb_dict_size_limit_basic.test new file mode 100644 index 00000000000..00aa476e8d2 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/innodb_dict_size_limit_basic.test @@ -0,0 +1 @@ +--echo XtraDB extension diff --git a/mysql-test/suite/sys_vars/t/innodb_doublewrite_file_basic.test b/mysql-test/suite/sys_vars/t/innodb_doublewrite_file_basic.test new file mode 100644 index 00000000000..00aa476e8d2 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/innodb_doublewrite_file_basic.test @@ -0,0 +1 @@ +--echo XtraDB extension diff --git a/mysql-test/suite/sys_vars/t/innodb_fast_checksum_basic.test b/mysql-test/suite/sys_vars/t/innodb_fast_checksum_basic.test new file mode 100644 index 00000000000..00aa476e8d2 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/innodb_fast_checksum_basic.test @@ -0,0 +1 @@ +--echo XtraDB extension diff --git a/mysql-test/suite/sys_vars/t/innodb_file_format_max_basic.test b/mysql-test/suite/sys_vars/t/innodb_file_format_max_basic.test new file mode 100644 index 00000000000..00aa476e8d2 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/innodb_file_format_max_basic.test @@ -0,0 +1 @@ +--echo XtraDB extension diff --git a/mysql-test/suite/sys_vars/t/innodb_flush_log_at_trx_commit_basic.test b/mysql-test/suite/sys_vars/t/innodb_flush_log_at_trx_commit_basic.test index 90da929d199..56cfc2ffebe 100644 --- a/mysql-test/suite/sys_vars/t/innodb_flush_log_at_trx_commit_basic.test +++ b/mysql-test/suite/sys_vars/t/innodb_flush_log_at_trx_commit_basic.test @@ -56,11 +56,6 @@ SELECT @@global.innodb_flush_log_at_trx_commit; # Check if variable can be accessed with and without @@ sign # ############################################################################### ---Error ER_GLOBAL_VARIABLE -SET innodb_flush_log_at_trx_commit = 1; -SELECT @@innodb_flush_log_at_trx_commit; - - --Error ER_UNKNOWN_TABLE SELECT local.innodb_flush_log_at_trx_commit; diff --git a/mysql-test/suite/sys_vars/t/innodb_flush_neighbor_pages_basic.test b/mysql-test/suite/sys_vars/t/innodb_flush_neighbor_pages_basic.test new file mode 100644 index 00000000000..00aa476e8d2 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/innodb_flush_neighbor_pages_basic.test @@ -0,0 +1 @@ +--echo XtraDB extension diff --git a/mysql-test/suite/sys_vars/t/innodb_ibuf_accel_rate_basic.test b/mysql-test/suite/sys_vars/t/innodb_ibuf_accel_rate_basic.test new file mode 100644 index 00000000000..00aa476e8d2 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/innodb_ibuf_accel_rate_basic.test @@ -0,0 +1 @@ +--echo XtraDB extension diff --git a/mysql-test/suite/sys_vars/t/innodb_ibuf_active_contract_basic.test b/mysql-test/suite/sys_vars/t/innodb_ibuf_active_contract_basic.test new file mode 100644 index 00000000000..00aa476e8d2 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/innodb_ibuf_active_contract_basic.test @@ -0,0 +1 @@ +--echo XtraDB extension diff --git a/mysql-test/suite/sys_vars/t/innodb_ibuf_max_size_basic.test b/mysql-test/suite/sys_vars/t/innodb_ibuf_max_size_basic.test new file mode 100644 index 00000000000..00aa476e8d2 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/innodb_ibuf_max_size_basic.test @@ -0,0 +1 @@ +--echo XtraDB extension diff --git a/mysql-test/suite/sys_vars/t/innodb_import_table_from_xtrabackup_basic.test b/mysql-test/suite/sys_vars/t/innodb_import_table_from_xtrabackup_basic.test new file mode 100644 index 00000000000..00aa476e8d2 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/innodb_import_table_from_xtrabackup_basic.test @@ -0,0 +1 @@ +--echo XtraDB extension diff --git a/mysql-test/suite/sys_vars/t/innodb_large_prefix_basic.test b/mysql-test/suite/sys_vars/t/innodb_large_prefix_basic.test new file mode 100644 index 00000000000..00aa476e8d2 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/innodb_large_prefix_basic.test @@ -0,0 +1 @@ +--echo XtraDB extension diff --git a/mysql-test/suite/sys_vars/t/innodb_lazy_drop_table_basic.test b/mysql-test/suite/sys_vars/t/innodb_lazy_drop_table_basic.test new file mode 100644 index 00000000000..00aa476e8d2 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/innodb_lazy_drop_table_basic.test @@ -0,0 +1 @@ +--echo XtraDB extension diff --git a/mysql-test/suite/sys_vars/t/innodb_log_block_size_basic.test b/mysql-test/suite/sys_vars/t/innodb_log_block_size_basic.test new file mode 100644 index 00000000000..00aa476e8d2 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/innodb_log_block_size_basic.test @@ -0,0 +1 @@ +--echo XtraDB extension diff --git a/mysql-test/suite/sys_vars/t/innodb_page_size_basic.test b/mysql-test/suite/sys_vars/t/innodb_page_size_basic.test new file mode 100644 index 00000000000..00aa476e8d2 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/innodb_page_size_basic.test @@ -0,0 +1 @@ +--echo XtraDB extension diff --git a/mysql-test/suite/sys_vars/t/innodb_read_ahead_basic.test b/mysql-test/suite/sys_vars/t/innodb_read_ahead_basic.test new file mode 100644 index 00000000000..00aa476e8d2 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/innodb_read_ahead_basic.test @@ -0,0 +1 @@ +--echo XtraDB extension diff --git a/mysql-test/suite/sys_vars/t/innodb_recovery_stats_basic.test b/mysql-test/suite/sys_vars/t/innodb_recovery_stats_basic.test new file mode 100644 index 00000000000..00aa476e8d2 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/innodb_recovery_stats_basic.test @@ -0,0 +1 @@ +--echo XtraDB extension diff --git a/mysql-test/suite/sys_vars/t/innodb_recovery_update_relay_log_basic.test b/mysql-test/suite/sys_vars/t/innodb_recovery_update_relay_log_basic.test new file mode 100644 index 00000000000..00aa476e8d2 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/innodb_recovery_update_relay_log_basic.test @@ -0,0 +1 @@ +--echo XtraDB extension diff --git a/mysql-test/suite/sys_vars/t/innodb_rollback_segments_basic.test b/mysql-test/suite/sys_vars/t/innodb_rollback_segments_basic.test new file mode 100644 index 00000000000..00aa476e8d2 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/innodb_rollback_segments_basic.test @@ -0,0 +1 @@ +--echo XtraDB extension diff --git a/mysql-test/suite/sys_vars/t/innodb_show_locks_held_basic.test b/mysql-test/suite/sys_vars/t/innodb_show_locks_held_basic.test new file mode 100644 index 00000000000..00aa476e8d2 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/innodb_show_locks_held_basic.test @@ -0,0 +1 @@ +--echo XtraDB extension diff --git a/mysql-test/suite/sys_vars/t/innodb_show_verbose_locks_basic.test b/mysql-test/suite/sys_vars/t/innodb_show_verbose_locks_basic.test new file mode 100644 index 00000000000..00aa476e8d2 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/innodb_show_verbose_locks_basic.test @@ -0,0 +1 @@ +--echo XtraDB extension diff --git a/mysql-test/suite/sys_vars/t/innodb_stats_auto_update_basic.test b/mysql-test/suite/sys_vars/t/innodb_stats_auto_update_basic.test new file mode 100644 index 00000000000..00aa476e8d2 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/innodb_stats_auto_update_basic.test @@ -0,0 +1 @@ +--echo XtraDB extension diff --git a/mysql-test/suite/sys_vars/t/innodb_stats_method_basic.test b/mysql-test/suite/sys_vars/t/innodb_stats_method_basic.test new file mode 100644 index 00000000000..00aa476e8d2 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/innodb_stats_method_basic.test @@ -0,0 +1 @@ +--echo XtraDB extension diff --git a/mysql-test/suite/sys_vars/t/innodb_stats_update_need_lock_basic.test b/mysql-test/suite/sys_vars/t/innodb_stats_update_need_lock_basic.test new file mode 100644 index 00000000000..00aa476e8d2 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/innodb_stats_update_need_lock_basic.test @@ -0,0 +1 @@ +--echo XtraDB extension diff --git a/mysql-test/suite/sys_vars/t/innodb_thread_concurrency_timer_based_basic.test b/mysql-test/suite/sys_vars/t/innodb_thread_concurrency_timer_based_basic.test new file mode 100644 index 00000000000..00aa476e8d2 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/innodb_thread_concurrency_timer_based_basic.test @@ -0,0 +1 @@ +--echo XtraDB extension diff --git a/mysql-test/suite/sys_vars/t/innodb_use_global_flush_log_at_trx_commit_basic.test b/mysql-test/suite/sys_vars/t/innodb_use_global_flush_log_at_trx_commit_basic.test new file mode 100644 index 00000000000..00aa476e8d2 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/innodb_use_global_flush_log_at_trx_commit_basic.test @@ -0,0 +1 @@ +--echo XtraDB extension diff --git a/mysql-test/suite/sys_vars/t/innodb_use_sys_stats_table_basic.test b/mysql-test/suite/sys_vars/t/innodb_use_sys_stats_table_basic.test new file mode 100644 index 00000000000..00aa476e8d2 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/innodb_use_sys_stats_table_basic.test @@ -0,0 +1 @@ +--echo XtraDB extension diff --git a/mysql-test/suite/vcol/r/vcol_ins_upd_innodb.result b/mysql-test/suite/vcol/r/vcol_ins_upd_innodb.result index a2ebc7a8cd8..2108576ce2c 100644 --- a/mysql-test/suite/vcol/r/vcol_ins_upd_innodb.result +++ b/mysql-test/suite/vcol/r/vcol_ins_upd_innodb.result @@ -25,8 +25,8 @@ a b c # INSERT INTO tbl_name VALUES... a non-NULL value is specified against vcols insert into t1 values (1,2,3); Warnings: -Warning 1647 The value specified for computed column 'b' in table 't1' ignored -Warning 1647 The value specified for computed column 'c' in table 't1' ignored +Warning 1718 The value specified for computed column 'b' in table 't1' ignored +Warning 1718 The value specified for computed column 'c' in table 't1' ignored select * from t1; a b c 1 -1 -1 @@ -65,8 +65,8 @@ a b c # against vcols insert into t1 (a,b) values (1,3), (2,4); Warnings: -Warning 1647 The value specified for computed column 'b' in table 't1' ignored -Warning 1647 The value specified for computed column 'b' in table 't1' ignored +Warning 1718 The value specified for computed column 'b' in table 't1' ignored +Warning 1718 The value specified for computed column 'b' in table 't1' ignored select * from t1; a b c 1 -1 -1 @@ -107,8 +107,8 @@ a b c create table t2 like t1; insert into t2 select * from t1; Warnings: -Warning 1647 The value specified for computed column 'b' in table 't2' ignored -Warning 1647 The value specified for computed column 'c' in table 't2' ignored +Warning 1718 The value specified for computed column 'b' in table 't2' ignored +Warning 1718 The value specified for computed column 'c' in table 't2' ignored select * from t1; a b c 2 -2 -2 @@ -123,8 +123,8 @@ a b c create table t2 like t1; insert into t2 (a,b) select a,b from t1; Warnings: -Warning 1647 The value specified for computed column 'b' in table 't2' ignored -Warning 1647 The value specified for computed column 'b' in table 't2' ignored +Warning 1718 The value specified for computed column 'b' in table 't2' ignored +Warning 1718 The value specified for computed column 'b' in table 't2' ignored select * from t2; a b c 2 -2 -2 @@ -159,7 +159,7 @@ a b c 2 -2 -2 update t1 set c=3 where a=2; Warnings: -Warning 1647 The value specified for computed column 'c' in table 't1' ignored +Warning 1718 The value specified for computed column 'c' in table 't1' ignored select * from t1; a b c 1 -1 -1 @@ -189,7 +189,7 @@ a b c 2 -2 -2 update t1 set c=3 where b=-2; Warnings: -Warning 1647 The value specified for computed column 'c' in table 't1' ignored +Warning 1718 The value specified for computed column 'c' in table 't1' ignored select * from t1; a b c 1 -1 -1 diff --git a/mysql-test/suite/vcol/r/vcol_select_innodb.result b/mysql-test/suite/vcol/r/vcol_select_innodb.result index aa32d91142e..a21a230a573 100644 --- a/mysql-test/suite/vcol/r/vcol_select_innodb.result +++ b/mysql-test/suite/vcol/r/vcol_select_innodb.result @@ -22,7 +22,7 @@ a b c 1 -1 -1 explain select * from t2 where c=-1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ref c c 5 const 1 +1 SIMPLE t2 ref c c 5 const 1 Using index condition # select_type=SIMPLE, type=ALL select * from t1 where b=-1; a b c @@ -53,7 +53,7 @@ a b c a b c explain select * from t1,t3 where t1.c=t3.c and t3.c=-1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t3 const c c 5 const 1 -1 SIMPLE t1 ref c c 5 const 2 +1 SIMPLE t1 ref c c 5 const 2 Using index condition # select_type=PRIMARY, type=index,ALL select * from t1 where b in (select c from t3); a b c @@ -130,7 +130,7 @@ count(distinct c) 3 explain select count(distinct c) from t1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL c 5 NULL 5 Using index +1 SIMPLE t1 range NULL c 5 NULL 6 Using index for group-by (scanning) ### ### filesort & range-based utils ### @@ -141,7 +141,7 @@ a b c 2 -2 -2 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; Using MRR +1 SIMPLE t3 range c c 5 NULL 2 Using index condition; Using MRR # SELECT * FROM tbl_name WHERE <non-vcol expr> select * from t3 where a between 1 and 2; a b c @@ -149,7 +149,7 @@ a b c 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 where +1 SIMPLE t3 range PRIMARY PRIMARY 4 NULL 2 Using where # SELECT * FROM tbl_name WHERE <non-indexed vcol expr> select * from t3 where b between -2 and -1; a b c @@ -165,7 +165,7 @@ a b c 2 -2 -2 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; Using MRR +1 SIMPLE t3 range c c 5 NULL 2 Using index condition; Using MRR # 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 @@ -173,7 +173,7 @@ a b c 1 -1 -1 explain select * from t3 where a between 1 and 2 order by b; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 range PRIMARY PRIMARY 4 NULL 1 Using where; Using filesort +1 SIMPLE t3 range PRIMARY PRIMARY 4 NULL 2 Using where; Using filesort # 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 @@ -181,7 +181,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 where; Using filesort +1 SIMPLE t3 range PRIMARY PRIMARY 4 NULL 2 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 @@ -205,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; Using MRR; Using filesort +1 SIMPLE t3 range c c 5 NULL 2 Using index condition; Using MRR; 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 @@ -221,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 2 Using index condition # SELECT sum(<non-indexed vcol>) FROM tbl_name GROUP BY <non-indexed vcol> select sum(b) from t1 group by b; sum(b) diff --git a/mysql-test/suite/vcol/r/vcol_supported_sql_funcs_innodb.result b/mysql-test/suite/vcol/r/vcol_supported_sql_funcs_innodb.result index 83f755a2e7f..c75b8a24575 100644 --- a/mysql-test/suite/vcol/r/vcol_supported_sql_funcs_innodb.result +++ b/mysql-test/suite/vcol/r/vcol_supported_sql_funcs_innodb.result @@ -170,11 +170,11 @@ t1 CREATE TABLE `t1` ( `b` double AS (format(cot(a),6)) VIRTUAL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 insert into t1 values (12,default); -insert into t1 values (0,default); +insert into t1 values (1,default); select * from t1; a b 12 -1.572673 -0 NULL +1 0.642093 drop table t1; set sql_warnings = 0; # CRC32() diff --git a/mysql-test/suite/vcol/r/vcol_view_innodb.result b/mysql-test/suite/vcol/r/vcol_view_innodb.result index ae834722606..18991634b62 100644 --- a/mysql-test/suite/vcol/r/vcol_view_innodb.result +++ b/mysql-test/suite/vcol/r/vcol_view_innodb.result @@ -266,8 +266,8 @@ insert into v1 (a) values (3); ERROR HY000: CHECK OPTION failed 'test.v1' insert ignore into v1 (a) values (2),(3),(0); Warnings: -Error 1369 CHECK OPTION failed 'test.v1' -Error 1369 CHECK OPTION failed 'test.v1' +Warning 1369 CHECK OPTION failed 'test.v1' +Warning 1369 CHECK OPTION failed 'test.v1' select * from t1; a b c 1 -1 -1 diff --git a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test index 698bf67b927..4a43969a057 100644 --- a/mysql-test/t/information_schema.test +++ b/mysql-test/t/information_schema.test @@ -536,7 +536,7 @@ connect (user10261,localhost,mysqltest_4,,); connection user10261; --sorted_result SELECT TABLE_NAME, COLUMN_NAME, PRIVILEGES FROM INFORMATION_SCHEMA.COLUMNS -where COLUMN_NAME='TABLE_NAME'; +where COLUMN_NAME='TABLE_NAME' and table_name not like 'innodb%'; connection default; disconnect user10261; delete from mysql.user where user='mysqltest_4'; @@ -917,10 +917,10 @@ DROP USER mysql_bug20230@localhost; # INFORMARTION_SCHEMA.TABLES # -SELECT MAX(table_name) FROM information_schema.tables WHERE table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test'); +SELECT MAX(table_name) FROM information_schema.tables WHERE table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test') and table_name not like 'xtradb%'; SELECT table_name from information_schema.tables WHERE table_name=(SELECT MAX(table_name) - FROM information_schema.tables WHERE table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test')); + FROM information_schema.tables WHERE table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test') and table_name not like 'xtradb%'); # # Bug #23037 Bug in field "Default" of query "SHOW COLUMNS FROM table" # diff --git a/mysql-test/t/innodb-analyze.test b/mysql-test/t/innodb-analyze.test deleted file mode 100644 index 9bdb9db697c..00000000000 --- a/mysql-test/t/innodb-analyze.test +++ /dev/null @@ -1,65 +0,0 @@ -# -# Test that mysqld does not crash when running ANALYZE TABLE with -# different values of the parameter innodb_stats_sample_pages. -# - --- source include/have_innodb.inc - -# we care only that the following SQL commands do not produce errors -# and do not crash the server --- disable_query_log --- disable_result_log --- enable_warnings - -let $sample_pages=`select @@innodb_stats_sample_pages`; -SET GLOBAL innodb_stats_sample_pages=0; - -# check that the value has been adjusted to 1 --- enable_result_log -SHOW VARIABLES LIKE 'innodb_stats_sample_pages'; --- disable_result_log - -CREATE TABLE innodb_analyze ( - a INT, - b INT, - KEY(a), - KEY(b,a) -) ENGINE=InnoDB; - -# test with empty table - -ANALYZE TABLE innodb_analyze; - -SET GLOBAL innodb_stats_sample_pages=2; -ANALYZE TABLE innodb_analyze; - -SET GLOBAL innodb_stats_sample_pages=4; -ANALYZE TABLE innodb_analyze; - -SET GLOBAL innodb_stats_sample_pages=8; -ANALYZE TABLE innodb_analyze; - -SET GLOBAL innodb_stats_sample_pages=16; -ANALYZE TABLE innodb_analyze; - -INSERT INTO innodb_analyze VALUES -(1,1), (1,1), (1,2), (1,3), (1,4), (1,5), -(8,1), (8,8), (8,2), (7,1), (1,4), (3,5); - -SET GLOBAL innodb_stats_sample_pages=1; -ANALYZE TABLE innodb_analyze; - -SET GLOBAL innodb_stats_sample_pages=2; -ANALYZE TABLE innodb_analyze; - -SET GLOBAL innodb_stats_sample_pages=4; -ANALYZE TABLE innodb_analyze; - -SET GLOBAL innodb_stats_sample_pages=8; -ANALYZE TABLE innodb_analyze; - -SET GLOBAL innodb_stats_sample_pages=16; -ANALYZE TABLE innodb_analyze; - -DROP TABLE innodb_analyze; -EVAL SET GLOBAL innodb_stats_sample_pages=$sample_pages; diff --git a/mysql-test/t/innodb-consistent-master.opt b/mysql-test/t/innodb-consistent-master.opt deleted file mode 100644 index cb48f1aaf60..00000000000 --- a/mysql-test/t/innodb-consistent-master.opt +++ /dev/null @@ -1 +0,0 @@ ---loose-innodb_lock_wait_timeout=2 diff --git a/mysql-test/t/innodb-consistent.test b/mysql-test/t/innodb-consistent.test deleted file mode 100644 index 5a7f4dc392d..00000000000 --- a/mysql-test/t/innodb-consistent.test +++ /dev/null @@ -1,58 +0,0 @@ --- source include/not_embedded.inc --- source include/have_innodb.inc - ---disable_warnings -drop table if exists t1; ---enable_warnings - -# REPLACE INTO ... SELECT and INSERT INTO ... SELECT should do -# a consistent read of the source table. - -connect (a,localhost,root,,); -connect (b,localhost,root,,); -connection a; -set session transaction isolation level read committed; -create table t1(a int not null) engine=innodb DEFAULT CHARSET=latin1; -create table t2 like t1; -insert into t2 values (1),(2),(3),(4),(5),(6),(7); -set autocommit=0; - -# REPLACE INTO ... SELECT case -begin; -# this should not result in any locks on t2. -replace into t1 select * from t2; - -connection b; -set session transaction isolation level read committed; -set autocommit=0; -# should not cuase a lock wait. -delete from t2 where a=5; -commit; -delete from t2; -commit; -connection a; -commit; - -# INSERT INTO ... SELECT case -begin; -# this should not result in any locks on t2. -insert into t1 select * from t2; - -connection b; -set session transaction isolation level read committed; -set autocommit=0; -# should not cuase a lock wait. -delete from t2 where a=5; -commit; -delete from t2; -commit; -connection a; -commit; - -select * from t1; -drop table t1; -drop table t2; - -connection default; -disconnect a; -disconnect b; diff --git a/mysql-test/t/innodb-index_ucs2.test b/mysql-test/t/innodb-index_ucs2.test deleted file mode 100644 index fff9a4da1a8..00000000000 --- a/mysql-test/t/innodb-index_ucs2.test +++ /dev/null @@ -1,5 +0,0 @@ --- source include/have_innodb.inc --- source include/have_ucs2.inc - --- let charset = ucs2 --- source include/innodb-index.inc diff --git a/mysql-test/t/innodb-replace.test b/mysql-test/t/innodb-replace.test deleted file mode 100644 index 8c3aacde5e8..00000000000 --- a/mysql-test/t/innodb-replace.test +++ /dev/null @@ -1,22 +0,0 @@ --- source include/have_innodb.inc -# embedded server ignores 'delayed', so skip this --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1; ---enable_warnings - -# -# Bug #1078 -# -create table t1 (c1 char(5) unique not null, c2 int, stamp timestamp) engine=innodb; -select * from t1; ---error ER_DELAYED_NOT_SUPPORTED -replace delayed into t1 (c1, c2) values ( "text1","11"); -select * from t1; ---error ER_DELAYED_NOT_SUPPORTED -replace delayed into t1 (c1, c2) values ( "text1","12"); -select * from t1; -drop table t1; - -# End of 4.1 tests diff --git a/mysql-test/t/innodb-timeout.test b/mysql-test/t/innodb-timeout.test deleted file mode 100644 index 7f7bcecb4ee..00000000000 --- a/mysql-test/t/innodb-timeout.test +++ /dev/null @@ -1,69 +0,0 @@ --- source include/have_innodb.inc - -let $timeout=`select @@innodb_lock_wait_timeout`; -set global innodb_lock_wait_timeout=42; - -connect (a,localhost,root,,); -connect (b,localhost,root,,); - -connection a; -select @@innodb_lock_wait_timeout; -set innodb_lock_wait_timeout=1; -select @@innodb_lock_wait_timeout; - -connection b; -select @@innodb_lock_wait_timeout; -set global innodb_lock_wait_timeout=347; -select @@innodb_lock_wait_timeout; -set innodb_lock_wait_timeout=1; -select @@innodb_lock_wait_timeout; - -connect (c,localhost,root,,); -connection c; -select @@innodb_lock_wait_timeout; -connection default; -disconnect c; - -connection a; -create table t1(a int primary key)engine=innodb; -begin; -insert into t1 values(1),(2),(3); - -connection b; -set innodb_lock_wait_timeout=5; ---send -select * from t1 for update; - -connection a; -commit; - -connection b; -reap; - -connection a; -begin; -insert into t1 values(4); - -connection b; -# Test that we get a lock timeout. -# We cannot reliably test that the timeout is exactly 1 seconds due to -# process scheduling differences on the host running the test suite. But we -# can test that we are within reasonable range. -set innodb_lock_wait_timeout=2; -set @a= current_timestamp(); ---error ER_LOCK_WAIT_TIMEOUT -select * from t1 for update; -set @b= current_timestamp(); -set @c= timestampdiff(SECOND, @a, @b); -select if(@c >= 1 and @c <= 10, 'OK', concat("NOT OK, time passed=", @c)); - -connection a; -commit; -drop table t1; - -connection default; - -disconnect a; -disconnect b; - -eval set global innodb_lock_wait_timeout=$timeout; diff --git a/mysql-test/t/innodb_bug34053.test b/mysql-test/t/innodb_bug34053.test deleted file mode 100644 index b935e45c06d..00000000000 --- a/mysql-test/t/innodb_bug34053.test +++ /dev/null @@ -1,50 +0,0 @@ -# -# Make sure http://bugs.mysql.com/34053 remains fixed. -# - --- source include/not_embedded.inc --- source include/have_innodb.inc - -SET storage_engine=InnoDB; - -# we do not really care about what gets printed, we are only -# interested in getting success or failure according to our -# expectations --- disable_query_log --- disable_result_log - -GRANT USAGE ON *.* TO 'shane'@'localhost' IDENTIFIED BY '12345'; -FLUSH PRIVILEGES; - --- connect (con1,localhost,shane,12345,) - --- connection con1 --- error ER_SPECIFIC_ACCESS_DENIED_ERROR -CREATE TABLE innodb_monitor (a INT) ENGINE=INNODB; --- error ER_SPECIFIC_ACCESS_DENIED_ERROR -CREATE TABLE innodb_mem_validate (a INT) ENGINE=INNODB; -CREATE TABLE innodb_monitorx (a INT) ENGINE=INNODB; -DROP TABLE innodb_monitorx; -CREATE TABLE innodb_monito (a INT) ENGINE=INNODB; -DROP TABLE innodb_monito; -CREATE TABLE xinnodb_monitor (a INT) ENGINE=INNODB; -DROP TABLE xinnodb_monitor; -CREATE TABLE nnodb_monitor (a INT) ENGINE=INNODB; -DROP TABLE nnodb_monitor; - --- connection default -CREATE TABLE innodb_monitor (a INT) ENGINE=INNODB; -CREATE TABLE innodb_mem_validate (a INT) ENGINE=INNODB; - --- connection con1 --- error ER_SPECIFIC_ACCESS_DENIED_ERROR -DROP TABLE innodb_monitor; --- error ER_SPECIFIC_ACCESS_DENIED_ERROR -DROP TABLE innodb_mem_validate; - --- connection default -DROP TABLE innodb_monitor; -DROP TABLE innodb_mem_validate; -DROP USER 'shane'@'localhost'; - --- disconnect con1 diff --git a/mysql-test/t/innodb_bug34300.test b/mysql-test/t/innodb_bug34300.test deleted file mode 100644 index 5b1939e648e..00000000000 --- a/mysql-test/t/innodb_bug34300.test +++ /dev/null @@ -1,36 +0,0 @@ -# -# Bug#34300 Tinyblob & tinytext fields currupted after export/import and alter in 5.1 -# http://bugs.mysql.com/34300 -# - --- source include/have_innodb.inc - --- disable_query_log --- disable_result_log - -# set packet size and reconnect -let $max_packet=`select @@global.max_allowed_packet`; -SET @@global.max_allowed_packet=16777216; ---connect (newconn, localhost, root,,) - -DROP TABLE IF EXISTS bug34300; -CREATE TABLE bug34300 ( - f4 TINYTEXT, - f6 MEDIUMTEXT, - f8 TINYBLOB -) ENGINE=InnoDB; - -INSERT INTO bug34300 VALUES ('xxx', repeat('a', 8459264), 'zzz'); - --- enable_result_log - -SELECT f4, f8 FROM bug34300; - -ALTER TABLE bug34300 ADD COLUMN (f10 INT); - -SELECT f4, f8 FROM bug34300; - -DROP TABLE bug34300; -disconnect newconn; -connection default; -EVAL SET @@global.max_allowed_packet=$max_packet; diff --git a/mysql-test/t/innodb_bug35220.test b/mysql-test/t/innodb_bug35220.test deleted file mode 100644 index 26f7d6b1ddd..00000000000 --- a/mysql-test/t/innodb_bug35220.test +++ /dev/null @@ -1,16 +0,0 @@ -# -# Bug#35220 ALTER TABLE too picky on reserved word "foreign" -# http://bugs.mysql.com/35220 -# - --- source include/have_innodb.inc - -SET storage_engine=InnoDB; - -# we care only that the following SQL commands do not produce errors --- disable_query_log --- disable_result_log - -CREATE TABLE bug35220 (foreign_col INT, dummy_cant_delete_all_columns INT); -ALTER TABLE bug35220 DROP foreign_col; -DROP TABLE bug35220; diff --git a/mysql-test/t/innodb_bug36169.test b/mysql-test/t/innodb_bug36169.test deleted file mode 100644 index 5bf55193b5c..00000000000 --- a/mysql-test/t/innodb_bug36169.test +++ /dev/null @@ -1,1159 +0,0 @@ -# -# Bug#36169 create innodb compressed table with too large row size crashed -# http://bugs.mysql.com/36169 -# - --- source include/have_innodb.inc - -let $file_format=`select @@innodb_file_format`; -let $file_per_table=`select @@innodb_file_per_table`; -SET GLOBAL innodb_file_format='Barracuda'; -SET GLOBAL innodb_file_per_table=ON; - -# -# The following is copied from http://bugs.mysql.com/36169 -# (http://bugs.mysql.com/file.php?id=9121) -# Probably it can be simplified but that is not obvious. -# - -# we care only that the following SQL commands do produce errors -# as expected and do not crash the server --- disable_query_log --- disable_result_log - -# Generating 10 tables -# Creating a table with 94 columns and 24 indexes -DROP TABLE IF EXISTS `table0`; ---error ER_TOO_BIG_ROWSIZE -CREATE TABLE IF NOT EXISTS `table0` -(`col0` BOOL, -`col1` BOOL, -`col2` TINYINT, -`col3` DATE, -`col4` TIME, -`col5` SET ('test1','test2','test3'), -`col6` TIME, -`col7` TEXT, -`col8` DECIMAL, -`col9` SET ('test1','test2','test3'), -`col10` FLOAT, -`col11` DOUBLE PRECISION, -`col12` ENUM ('test1','test2','test3'), -`col13` TINYBLOB, -`col14` YEAR, -`col15` SET ('test1','test2','test3'), -`col16` NUMERIC, -`col17` NUMERIC, -`col18` BLOB, -`col19` DATETIME, -`col20` DOUBLE PRECISION, -`col21` DECIMAL, -`col22` DATETIME, -`col23` NUMERIC, -`col24` NUMERIC, -`col25` LONGTEXT, -`col26` TINYBLOB, -`col27` TIME, -`col28` TINYBLOB, -`col29` ENUM ('test1','test2','test3'), -`col30` SMALLINT, -`col31` REAL, -`col32` FLOAT, -`col33` CHAR (175), -`col34` TINYTEXT, -`col35` TINYTEXT, -`col36` TINYBLOB, -`col37` TINYBLOB, -`col38` TINYTEXT, -`col39` MEDIUMBLOB, -`col40` TIMESTAMP, -`col41` DOUBLE, -`col42` SMALLINT, -`col43` LONGBLOB, -`col44` VARCHAR (80), -`col45` MEDIUMTEXT, -`col46` NUMERIC, -`col47` BIGINT, -`col48` DATE, -`col49` TINYBLOB, -`col50` DATE, -`col51` BOOL, -`col52` MEDIUMINT, -`col53` FLOAT, -`col54` TINYBLOB, -`col55` LONGTEXT, -`col56` SMALLINT, -`col57` ENUM ('test1','test2','test3'), -`col58` DATETIME, -`col59` MEDIUMTEXT, -`col60` VARCHAR (232), -`col61` NUMERIC, -`col62` YEAR, -`col63` SMALLINT, -`col64` TIMESTAMP, -`col65` BLOB, -`col66` LONGBLOB, -`col67` INT, -`col68` LONGTEXT, -`col69` ENUM ('test1','test2','test3'), -`col70` INT, -`col71` TIME, -`col72` TIMESTAMP, -`col73` TIMESTAMP, -`col74` VARCHAR (170), -`col75` SET ('test1','test2','test3'), -`col76` TINYBLOB, -`col77` BIGINT, -`col78` NUMERIC, -`col79` DATETIME, -`col80` YEAR, -`col81` NUMERIC, -`col82` LONGBLOB, -`col83` TEXT, -`col84` CHAR (83), -`col85` DECIMAL, -`col86` FLOAT, -`col87` INT, -`col88` VARCHAR (145), -`col89` DATE, -`col90` DECIMAL, -`col91` DECIMAL, -`col92` MEDIUMBLOB, -`col93` TIME, -KEY `idx0` (`col69`,`col90`,`col8`), -KEY `idx1` (`col60`), -KEY `idx2` (`col60`,`col70`,`col74`), -KEY `idx3` (`col22`,`col32`,`col72`,`col30`), -KEY `idx4` (`col29`), -KEY `idx5` (`col19`,`col45`(143)), -KEY `idx6` (`col46`,`col48`,`col5`,`col39`(118)), -KEY `idx7` (`col48`,`col61`), -KEY `idx8` (`col93`), -KEY `idx9` (`col31`), -KEY `idx10` (`col30`,`col21`), -KEY `idx11` (`col67`), -KEY `idx12` (`col44`,`col6`,`col8`,`col38`(226)), -KEY `idx13` (`col71`,`col41`,`col15`,`col49`(88)), -KEY `idx14` (`col78`), -KEY `idx15` (`col63`,`col67`,`col64`), -KEY `idx16` (`col17`,`col86`), -KEY `idx17` (`col77`,`col56`,`col10`,`col55`(24)), -KEY `idx18` (`col62`), -KEY `idx19` (`col31`,`col57`,`col56`,`col53`), -KEY `idx20` (`col46`), -KEY `idx21` (`col83`(54)), -KEY `idx22` (`col51`,`col7`(120)), -KEY `idx23` (`col7`(163),`col31`,`col71`,`col14`) -)engine=innodb ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; - -# Creating a table with 10 columns and 32 indexes -DROP TABLE IF EXISTS `table1`; ---error ER_TOO_BIG_ROWSIZE -CREATE TABLE IF NOT EXISTS `table1` -(`col0` CHAR (113), -`col1` FLOAT, -`col2` BIGINT, -`col3` DECIMAL, -`col4` BLOB, -`col5` LONGTEXT, -`col6` SET ('test1','test2','test3'), -`col7` BIGINT, -`col8` BIGINT, -`col9` TINYBLOB, -KEY `idx0` (`col5`(101),`col7`,`col8`), -KEY `idx1` (`col8`), -KEY `idx2` (`col4`(177),`col9`(126),`col6`,`col3`), -KEY `idx3` (`col5`(160)), -KEY `idx4` (`col9`(242)), -KEY `idx5` (`col4`(139),`col2`,`col3`), -KEY `idx6` (`col7`), -KEY `idx7` (`col6`,`col2`,`col0`,`col3`), -KEY `idx8` (`col9`(66)), -KEY `idx9` (`col5`(253)), -KEY `idx10` (`col1`,`col7`,`col2`), -KEY `idx11` (`col9`(242),`col0`,`col8`,`col5`(163)), -KEY `idx12` (`col8`), -KEY `idx13` (`col0`,`col9`(37)), -KEY `idx14` (`col0`), -KEY `idx15` (`col5`(111)), -KEY `idx16` (`col8`,`col0`,`col5`(13)), -KEY `idx17` (`col4`(139)), -KEY `idx18` (`col5`(189),`col2`,`col3`,`col9`(136)), -KEY `idx19` (`col0`,`col3`,`col1`,`col8`), -KEY `idx20` (`col8`), -KEY `idx21` (`col0`,`col7`,`col9`(227),`col3`), -KEY `idx22` (`col0`), -KEY `idx23` (`col2`), -KEY `idx24` (`col3`), -KEY `idx25` (`col2`,`col3`), -KEY `idx26` (`col0`), -KEY `idx27` (`col5`(254)), -KEY `idx28` (`col3`), -KEY `idx29` (`col3`), -KEY `idx30` (`col7`,`col3`,`col0`,`col4`(220)), -KEY `idx31` (`col4`(1),`col0`) -)engine=innodb ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; - -# Creating a table with 141 columns and 18 indexes -DROP TABLE IF EXISTS `table2`; ---error ER_TOO_BIG_ROWSIZE -CREATE TABLE IF NOT EXISTS `table2` -(`col0` BOOL, -`col1` MEDIUMINT, -`col2` VARCHAR (209), -`col3` MEDIUMBLOB, -`col4` CHAR (13), -`col5` DOUBLE, -`col6` TINYTEXT, -`col7` REAL, -`col8` SMALLINT, -`col9` BLOB, -`col10` TINYINT, -`col11` DECIMAL, -`col12` BLOB, -`col13` DECIMAL, -`col14` LONGBLOB, -`col15` SMALLINT, -`col16` LONGBLOB, -`col17` TINYTEXT, -`col18` FLOAT, -`col19` CHAR (78), -`col20` MEDIUMTEXT, -`col21` SET ('test1','test2','test3'), -`col22` MEDIUMINT, -`col23` INT, -`col24` MEDIUMBLOB, -`col25` ENUM ('test1','test2','test3'), -`col26` TINYBLOB, -`col27` VARCHAR (116), -`col28` TIMESTAMP, -`col29` BLOB, -`col30` SMALLINT, -`col31` DOUBLE PRECISION, -`col32` DECIMAL, -`col33` DECIMAL, -`col34` TEXT, -`col35` MEDIUMINT, -`col36` MEDIUMINT, -`col37` BIGINT, -`col38` VARCHAR (253), -`col39` TINYBLOB, -`col40` MEDIUMBLOB, -`col41` BIGINT, -`col42` DOUBLE, -`col43` TEXT, -`col44` BLOB, -`col45` TIME, -`col46` MEDIUMINT, -`col47` DOUBLE PRECISION, -`col48` SET ('test1','test2','test3'), -`col49` DOUBLE PRECISION, -`col50` VARCHAR (97), -`col51` TEXT, -`col52` NUMERIC, -`col53` ENUM ('test1','test2','test3'), -`col54` MEDIUMTEXT, -`col55` MEDIUMINT, -`col56` DATETIME, -`col57` DATETIME, -`col58` MEDIUMTEXT, -`col59` CHAR (244), -`col60` LONGBLOB, -`col61` MEDIUMBLOB, -`col62` DOUBLE, -`col63` SMALLINT, -`col64` BOOL, -`col65` SMALLINT, -`col66` VARCHAR (212), -`col67` TIME, -`col68` REAL, -`col69` BOOL, -`col70` BIGINT, -`col71` DATE, -`col72` TINYINT, -`col73` ENUM ('test1','test2','test3'), -`col74` DATE, -`col75` TIME, -`col76` DATETIME, -`col77` BOOL, -`col78` TINYTEXT, -`col79` MEDIUMINT, -`col80` NUMERIC, -`col81` LONGTEXT, -`col82` SET ('test1','test2','test3'), -`col83` DOUBLE PRECISION, -`col84` NUMERIC, -`col85` VARCHAR (184), -`col86` DOUBLE PRECISION, -`col87` MEDIUMTEXT, -`col88` MEDIUMBLOB, -`col89` BOOL, -`col90` SMALLINT, -`col91` TINYINT, -`col92` ENUM ('test1','test2','test3'), -`col93` BOOL, -`col94` TIMESTAMP, -`col95` BOOL, -`col96` MEDIUMTEXT, -`col97` DECIMAL, -`col98` BOOL, -`col99` DECIMAL, -`col100` MEDIUMINT, -`col101` DOUBLE PRECISION, -`col102` TINYINT, -`col103` BOOL, -`col104` MEDIUMINT, -`col105` DECIMAL, -`col106` NUMERIC, -`col107` TIMESTAMP, -`col108` MEDIUMBLOB, -`col109` TINYBLOB, -`col110` SET ('test1','test2','test3'), -`col111` YEAR, -`col112` TIMESTAMP, -`col113` CHAR (201), -`col114` BOOL, -`col115` TINYINT, -`col116` DOUBLE, -`col117` TINYINT, -`col118` TIMESTAMP, -`col119` SET ('test1','test2','test3'), -`col120` SMALLINT, -`col121` TINYBLOB, -`col122` TIMESTAMP, -`col123` BLOB, -`col124` DATE, -`col125` SMALLINT, -`col126` ENUM ('test1','test2','test3'), -`col127` MEDIUMBLOB, -`col128` DOUBLE PRECISION, -`col129` REAL, -`col130` VARCHAR (159), -`col131` MEDIUMBLOB, -`col132` BIGINT, -`col133` INT, -`col134` SET ('test1','test2','test3'), -`col135` CHAR (198), -`col136` SET ('test1','test2','test3'), -`col137` MEDIUMTEXT, -`col138` SMALLINT, -`col139` BLOB, -`col140` LONGBLOB, -KEY `idx0` (`col14`(139),`col24`(208),`col38`,`col35`), -KEY `idx1` (`col48`,`col118`,`col29`(131),`col100`), -KEY `idx2` (`col86`,`col67`,`col43`(175)), -KEY `idx3` (`col19`), -KEY `idx4` (`col40`(220),`col67`), -KEY `idx5` (`col99`,`col56`), -KEY `idx6` (`col68`,`col28`,`col137`(157)), -KEY `idx7` (`col51`(160),`col99`,`col45`,`col39`(9)), -KEY `idx8` (`col15`,`col52`,`col90`,`col94`), -KEY `idx9` (`col24`(3),`col139`(248),`col108`(118),`col41`), -KEY `idx10` (`col36`,`col92`,`col114`), -KEY `idx11` (`col115`,`col9`(116)), -KEY `idx12` (`col130`,`col93`,`col134`), -KEY `idx13` (`col123`(65)), -KEY `idx14` (`col44`(90),`col86`,`col119`), -KEY `idx15` (`col69`), -KEY `idx16` (`col132`,`col81`(118),`col18`), -KEY `idx17` (`col24`(250),`col7`,`col92`,`col45`) -)engine=innodb ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; - -# Creating a table with 199 columns and 1 indexes -DROP TABLE IF EXISTS `table3`; ---error ER_TOO_BIG_ROWSIZE -CREATE TABLE IF NOT EXISTS `table3` -(`col0` SMALLINT, -`col1` SET ('test1','test2','test3'), -`col2` TINYTEXT, -`col3` DOUBLE, -`col4` NUMERIC, -`col5` DATE, -`col6` BIGINT, -`col7` DOUBLE, -`col8` TEXT, -`col9` INT, -`col10` REAL, -`col11` TINYINT, -`col12` NUMERIC, -`col13` NUMERIC, -`col14` TIME, -`col15` DOUBLE, -`col16` REAL, -`col17` MEDIUMBLOB, -`col18` YEAR, -`col19` TINYTEXT, -`col20` YEAR, -`col21` CHAR (250), -`col22` TINYINT, -`col23` TINYINT, -`col24` SMALLINT, -`col25` DATETIME, -`col26` MEDIUMINT, -`col27` LONGBLOB, -`col28` VARCHAR (106), -`col29` FLOAT, -`col30` MEDIUMTEXT, -`col31` TINYBLOB, -`col32` BIGINT, -`col33` YEAR, -`col34` REAL, -`col35` MEDIUMBLOB, -`col36` LONGTEXT, -`col37` LONGBLOB, -`col38` BIGINT, -`col39` FLOAT, -`col40` TIME, -`col41` DATETIME, -`col42` BOOL, -`col43` BIGINT, -`col44` SMALLINT, -`col45` TIME, -`col46` DOUBLE PRECISION, -`col47` TIME, -`col48` TINYTEXT, -`col49` DOUBLE PRECISION, -`col50` BIGINT, -`col51` NUMERIC, -`col52` TINYBLOB, -`col53` DATE, -`col54` DECIMAL, -`col55` SMALLINT, -`col56` TINYTEXT, -`col57` ENUM ('test1','test2','test3'), -`col58` YEAR, -`col59` TIME, -`col60` TINYINT, -`col61` DECIMAL, -`col62` DOUBLE, -`col63` DATE, -`col64` LONGTEXT, -`col65` DOUBLE, -`col66` VARCHAR (88), -`col67` MEDIUMTEXT, -`col68` DATE, -`col69` MEDIUMINT, -`col70` DECIMAL, -`col71` MEDIUMTEXT, -`col72` LONGTEXT, -`col73` REAL, -`col74` DOUBLE, -`col75` TIME, -`col76` DATE, -`col77` DECIMAL, -`col78` MEDIUMBLOB, -`col79` NUMERIC, -`col80` BIGINT, -`col81` YEAR, -`col82` SMALLINT, -`col83` MEDIUMINT, -`col84` TINYINT, -`col85` MEDIUMBLOB, -`col86` TIME, -`col87` MEDIUMBLOB, -`col88` LONGTEXT, -`col89` BOOL, -`col90` BLOB, -`col91` LONGBLOB, -`col92` YEAR, -`col93` BLOB, -`col94` INT, -`col95` TINYTEXT, -`col96` TINYINT, -`col97` DECIMAL, -`col98` ENUM ('test1','test2','test3'), -`col99` MEDIUMINT, -`col100` TINYINT, -`col101` MEDIUMBLOB, -`col102` TINYINT, -`col103` SET ('test1','test2','test3'), -`col104` TIMESTAMP, -`col105` TEXT, -`col106` DATETIME, -`col107` MEDIUMTEXT, -`col108` CHAR (220), -`col109` TIME, -`col110` VARCHAR (131), -`col111` DECIMAL, -`col112` FLOAT, -`col113` SMALLINT, -`col114` BIGINT, -`col115` LONGBLOB, -`col116` SET ('test1','test2','test3'), -`col117` ENUM ('test1','test2','test3'), -`col118` BLOB, -`col119` MEDIUMTEXT, -`col120` SET ('test1','test2','test3'), -`col121` DATETIME, -`col122` FLOAT, -`col123` VARCHAR (242), -`col124` YEAR, -`col125` MEDIUMBLOB, -`col126` TIME, -`col127` BOOL, -`col128` TINYBLOB, -`col129` DOUBLE, -`col130` TINYINT, -`col131` BIGINT, -`col132` SMALLINT, -`col133` INT, -`col134` DOUBLE PRECISION, -`col135` MEDIUMBLOB, -`col136` SET ('test1','test2','test3'), -`col137` TINYTEXT, -`col138` DOUBLE PRECISION, -`col139` NUMERIC, -`col140` BLOB, -`col141` SET ('test1','test2','test3'), -`col142` INT, -`col143` VARCHAR (26), -`col144` BLOB, -`col145` REAL, -`col146` SET ('test1','test2','test3'), -`col147` LONGBLOB, -`col148` TEXT, -`col149` BLOB, -`col150` CHAR (189), -`col151` LONGTEXT, -`col152` INT, -`col153` FLOAT, -`col154` LONGTEXT, -`col155` DATE, -`col156` LONGBLOB, -`col157` TINYBLOB, -`col158` REAL, -`col159` DATE, -`col160` TIME, -`col161` YEAR, -`col162` DOUBLE, -`col163` VARCHAR (90), -`col164` FLOAT, -`col165` NUMERIC, -`col166` ENUM ('test1','test2','test3'), -`col167` DOUBLE PRECISION, -`col168` DOUBLE PRECISION, -`col169` TINYBLOB, -`col170` TIME, -`col171` SMALLINT, -`col172` TINYTEXT, -`col173` SMALLINT, -`col174` DOUBLE, -`col175` VARCHAR (14), -`col176` VARCHAR (90), -`col177` REAL, -`col178` MEDIUMINT, -`col179` TINYBLOB, -`col180` FLOAT, -`col181` TIMESTAMP, -`col182` REAL, -`col183` DOUBLE PRECISION, -`col184` BIGINT, -`col185` INT, -`col186` MEDIUMTEXT, -`col187` TIME, -`col188` FLOAT, -`col189` TIME, -`col190` INT, -`col191` FLOAT, -`col192` MEDIUMINT, -`col193` TINYINT, -`col194` MEDIUMTEXT, -`col195` DATE, -`col196` TIME, -`col197` YEAR, -`col198` CHAR (206), -KEY `idx0` (`col39`,`col23`) -)engine=innodb ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; - -# Creating a table with 133 columns and 16 indexes -DROP TABLE IF EXISTS `table4`; ---error ER_TOO_BIG_ROWSIZE -CREATE TABLE IF NOT EXISTS `table4` -(`col0` VARCHAR (60), -`col1` NUMERIC, -`col2` LONGTEXT, -`col3` MEDIUMTEXT, -`col4` LONGTEXT, -`col5` LONGBLOB, -`col6` LONGBLOB, -`col7` DATETIME, -`col8` TINYTEXT, -`col9` BLOB, -`col10` BOOL, -`col11` BIGINT, -`col12` TEXT, -`col13` VARCHAR (213), -`col14` TINYBLOB, -`col15` BOOL, -`col16` MEDIUMTEXT, -`col17` DOUBLE, -`col18` TEXT, -`col19` BLOB, -`col20` SET ('test1','test2','test3'), -`col21` TINYINT, -`col22` DATETIME, -`col23` TINYINT, -`col24` ENUM ('test1','test2','test3'), -`col25` REAL, -`col26` BOOL, -`col27` FLOAT, -`col28` LONGBLOB, -`col29` DATETIME, -`col30` FLOAT, -`col31` SET ('test1','test2','test3'), -`col32` LONGBLOB, -`col33` NUMERIC, -`col34` YEAR, -`col35` VARCHAR (146), -`col36` BIGINT, -`col37` DATETIME, -`col38` DATE, -`col39` SET ('test1','test2','test3'), -`col40` CHAR (112), -`col41` FLOAT, -`col42` YEAR, -`col43` TIME, -`col44` DOUBLE, -`col45` NUMERIC, -`col46` FLOAT, -`col47` DECIMAL, -`col48` BIGINT, -`col49` DECIMAL, -`col50` YEAR, -`col51` MEDIUMTEXT, -`col52` LONGBLOB, -`col53` SET ('test1','test2','test3'), -`col54` BLOB, -`col55` FLOAT, -`col56` REAL, -`col57` REAL, -`col58` TEXT, -`col59` MEDIUMBLOB, -`col60` INT, -`col61` INT, -`col62` DATE, -`col63` TEXT, -`col64` DATE, -`col65` ENUM ('test1','test2','test3'), -`col66` DOUBLE PRECISION, -`col67` TINYTEXT, -`col68` TINYBLOB, -`col69` FLOAT, -`col70` BLOB, -`col71` DATETIME, -`col72` DOUBLE, -`col73` LONGTEXT, -`col74` TIME, -`col75` DATETIME, -`col76` VARCHAR (122), -`col77` MEDIUMTEXT, -`col78` MEDIUMTEXT, -`col79` BOOL, -`col80` LONGTEXT, -`col81` TINYTEXT, -`col82` NUMERIC, -`col83` DOUBLE PRECISION, -`col84` DATE, -`col85` YEAR, -`col86` BLOB, -`col87` TINYTEXT, -`col88` DOUBLE PRECISION, -`col89` MEDIUMINT, -`col90` MEDIUMTEXT, -`col91` NUMERIC, -`col92` DATETIME, -`col93` NUMERIC, -`col94` SET ('test1','test2','test3'), -`col95` TINYTEXT, -`col96` SET ('test1','test2','test3'), -`col97` YEAR, -`col98` MEDIUMINT, -`col99` TEXT, -`col100` TEXT, -`col101` TIME, -`col102` VARCHAR (225), -`col103` TINYTEXT, -`col104` TEXT, -`col105` MEDIUMTEXT, -`col106` TINYINT, -`col107` TEXT, -`col108` LONGBLOB, -`col109` LONGTEXT, -`col110` TINYTEXT, -`col111` CHAR (56), -`col112` YEAR, -`col113` ENUM ('test1','test2','test3'), -`col114` TINYBLOB, -`col115` DATETIME, -`col116` DATE, -`col117` TIME, -`col118` MEDIUMTEXT, -`col119` DOUBLE PRECISION, -`col120` FLOAT, -`col121` TIMESTAMP, -`col122` MEDIUMINT, -`col123` YEAR, -`col124` DATE, -`col125` TEXT, -`col126` FLOAT, -`col127` TINYTEXT, -`col128` BOOL, -`col129` NUMERIC, -`col130` TIMESTAMP, -`col131` INT, -`col132` MEDIUMBLOB, -KEY `idx0` (`col130`), -KEY `idx1` (`col30`,`col55`,`col19`(31)), -KEY `idx2` (`col104`(186)), -KEY `idx3` (`col131`), -KEY `idx4` (`col64`,`col93`,`col2`(11)), -KEY `idx5` (`col34`,`col121`,`col22`), -KEY `idx6` (`col33`,`col55`,`col83`), -KEY `idx7` (`col17`,`col87`(245),`col99`(17)), -KEY `idx8` (`col65`,`col120`), -KEY `idx9` (`col82`), -KEY `idx10` (`col9`(72)), -KEY `idx11` (`col88`), -KEY `idx12` (`col128`,`col9`(200),`col71`,`col66`), -KEY `idx13` (`col77`(126)), -KEY `idx14` (`col105`(26),`col13`,`col117`), -KEY `idx15` (`col4`(246),`col130`,`col115`,`col3`(141)) -)engine=innodb ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; - -# Creating a table with 176 columns and 13 indexes -DROP TABLE IF EXISTS `table5`; ---error ER_TOO_BIG_ROWSIZE -CREATE TABLE IF NOT EXISTS `table5` -(`col0` MEDIUMTEXT, -`col1` VARCHAR (90), -`col2` TINYTEXT, -`col3` TIME, -`col4` BOOL, -`col5` TINYTEXT, -`col6` BOOL, -`col7` TIMESTAMP, -`col8` TINYBLOB, -`col9` TINYINT, -`col10` YEAR, -`col11` SET ('test1','test2','test3'), -`col12` TEXT, -`col13` CHAR (248), -`col14` BIGINT, -`col15` TEXT, -`col16` TINYINT, -`col17` NUMERIC, -`col18` SET ('test1','test2','test3'), -`col19` LONGBLOB, -`col20` FLOAT, -`col21` INT, -`col22` TEXT, -`col23` BOOL, -`col24` DECIMAL, -`col25` DOUBLE PRECISION, -`col26` FLOAT, -`col27` TINYBLOB, -`col28` NUMERIC, -`col29` MEDIUMBLOB, -`col30` DATE, -`col31` LONGTEXT, -`col32` DATE, -`col33` FLOAT, -`col34` BIGINT, -`col35` TINYTEXT, -`col36` MEDIUMTEXT, -`col37` TIME, -`col38` INT, -`col39` TINYINT, -`col40` SET ('test1','test2','test3'), -`col41` CHAR (130), -`col42` SMALLINT, -`col43` INT, -`col44` MEDIUMTEXT, -`col45` VARCHAR (126), -`col46` INT, -`col47` DOUBLE PRECISION, -`col48` BIGINT, -`col49` MEDIUMTEXT, -`col50` TINYBLOB, -`col51` MEDIUMINT, -`col52` TEXT, -`col53` VARCHAR (208), -`col54` VARCHAR (207), -`col55` NUMERIC, -`col56` DATETIME, -`col57` ENUM ('test1','test2','test3'), -`col58` NUMERIC, -`col59` TINYBLOB, -`col60` VARCHAR (73), -`col61` MEDIUMTEXT, -`col62` TINYBLOB, -`col63` DATETIME, -`col64` NUMERIC, -`col65` MEDIUMINT, -`col66` DATETIME, -`col67` NUMERIC, -`col68` TINYINT, -`col69` VARCHAR (58), -`col70` DECIMAL, -`col71` MEDIUMTEXT, -`col72` DATE, -`col73` TIME, -`col74` DOUBLE PRECISION, -`col75` DECIMAL, -`col76` MEDIUMBLOB, -`col77` REAL, -`col78` YEAR, -`col79` YEAR, -`col80` LONGBLOB, -`col81` BLOB, -`col82` BIGINT, -`col83` ENUM ('test1','test2','test3'), -`col84` NUMERIC, -`col85` SET ('test1','test2','test3'), -`col86` MEDIUMTEXT, -`col87` LONGBLOB, -`col88` TIME, -`col89` ENUM ('test1','test2','test3'), -`col90` DECIMAL, -`col91` FLOAT, -`col92` DATETIME, -`col93` TINYTEXT, -`col94` TIMESTAMP, -`col95` TIMESTAMP, -`col96` TEXT, -`col97` REAL, -`col98` VARCHAR (198), -`col99` TIME, -`col100` TINYINT, -`col101` BIGINT, -`col102` LONGBLOB, -`col103` LONGBLOB, -`col104` MEDIUMINT, -`col105` MEDIUMTEXT, -`col106` TIMESTAMP, -`col107` SMALLINT, -`col108` NUMERIC, -`col109` DECIMAL, -`col110` FLOAT, -`col111` DECIMAL, -`col112` REAL, -`col113` TINYTEXT, -`col114` FLOAT, -`col115` VARCHAR (7), -`col116` LONGTEXT, -`col117` DATE, -`col118` BIGINT, -`col119` TEXT, -`col120` BIGINT, -`col121` BLOB, -`col122` CHAR (110), -`col123` NUMERIC, -`col124` MEDIUMBLOB, -`col125` NUMERIC, -`col126` NUMERIC, -`col127` BOOL, -`col128` TIME, -`col129` TINYBLOB, -`col130` TINYBLOB, -`col131` DATE, -`col132` INT, -`col133` VARCHAR (123), -`col134` CHAR (238), -`col135` VARCHAR (225), -`col136` LONGTEXT, -`col137` LONGBLOB, -`col138` REAL, -`col139` TINYBLOB, -`col140` DATETIME, -`col141` TINYTEXT, -`col142` LONGBLOB, -`col143` BIGINT, -`col144` VARCHAR (236), -`col145` TEXT, -`col146` YEAR, -`col147` DECIMAL, -`col148` TEXT, -`col149` MEDIUMBLOB, -`col150` TINYINT, -`col151` BOOL, -`col152` VARCHAR (72), -`col153` INT, -`col154` VARCHAR (165), -`col155` TINYINT, -`col156` MEDIUMTEXT, -`col157` DOUBLE PRECISION, -`col158` TIME, -`col159` MEDIUMBLOB, -`col160` LONGBLOB, -`col161` DATETIME, -`col162` DOUBLE PRECISION, -`col163` BLOB, -`col164` ENUM ('test1','test2','test3'), -`col165` TIMESTAMP, -`col166` DATE, -`col167` TINYBLOB, -`col168` TINYBLOB, -`col169` LONGBLOB, -`col170` DATETIME, -`col171` BIGINT, -`col172` VARCHAR (30), -`col173` LONGTEXT, -`col174` TIME, -`col175` FLOAT, -KEY `idx0` (`col16`,`col156`(139),`col97`,`col120`), -KEY `idx1` (`col24`,`col0`(108)), -KEY `idx2` (`col117`,`col173`(34),`col132`,`col82`), -KEY `idx3` (`col2`(86)), -KEY `idx4` (`col2`(43)), -KEY `idx5` (`col83`,`col35`(87),`col111`), -KEY `idx6` (`col6`,`col134`,`col92`), -KEY `idx7` (`col56`), -KEY `idx8` (`col30`,`col53`,`col129`(66)), -KEY `idx9` (`col53`,`col113`(211),`col32`,`col15`(75)), -KEY `idx10` (`col34`), -KEY `idx11` (`col126`), -KEY `idx12` (`col24`) -)engine=innodb ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; - -# Creating a table with 179 columns and 46 indexes -DROP TABLE IF EXISTS `table6`; --- error ER_TOO_BIG_ROWSIZE ---error ER_TOO_BIG_ROWSIZE -CREATE TABLE IF NOT EXISTS `table6` -(`col0` ENUM ('test1','test2','test3'), -`col1` MEDIUMBLOB, -`col2` MEDIUMBLOB, -`col3` DATETIME, -`col4` DATE, -`col5` YEAR, -`col6` REAL, -`col7` NUMERIC, -`col8` MEDIUMBLOB, -`col9` TEXT, -`col10` TIMESTAMP, -`col11` DOUBLE, -`col12` DOUBLE, -`col13` SMALLINT, -`col14` TIMESTAMP, -`col15` DECIMAL, -`col16` DATE, -`col17` TEXT, -`col18` LONGBLOB, -`col19` BIGINT, -`col20` FLOAT, -`col21` DATETIME, -`col22` TINYINT, -`col23` MEDIUMBLOB, -`col24` SET ('test1','test2','test3'), -`col25` TIME, -`col26` TEXT, -`col27` LONGTEXT, -`col28` BIGINT, -`col29` REAL, -`col30` YEAR, -`col31` MEDIUMBLOB, -`col32` MEDIUMINT, -`col33` FLOAT, -`col34` TEXT, -`col35` DATE, -`col36` TIMESTAMP, -`col37` REAL, -`col38` BLOB, -`col39` BLOB, -`col40` BLOB, -`col41` TINYBLOB, -`col42` INT, -`col43` TINYINT, -`col44` REAL, -`col45` BIGINT, -`col46` TIMESTAMP, -`col47` BLOB, -`col48` ENUM ('test1','test2','test3'), -`col49` BOOL, -`col50` CHAR (109), -`col51` DOUBLE, -`col52` DOUBLE PRECISION, -`col53` ENUM ('test1','test2','test3'), -`col54` FLOAT, -`col55` DOUBLE PRECISION, -`col56` CHAR (166), -`col57` TEXT, -`col58` TIME, -`col59` DECIMAL, -`col60` TEXT, -`col61` ENUM ('test1','test2','test3'), -`col62` LONGTEXT, -`col63` YEAR, -`col64` DOUBLE, -`col65` CHAR (87), -`col66` DATE, -`col67` BOOL, -`col68` MEDIUMBLOB, -`col69` DATETIME, -`col70` DECIMAL, -`col71` TIME, -`col72` REAL, -`col73` LONGTEXT, -`col74` BLOB, -`col75` REAL, -`col76` INT, -`col77` INT, -`col78` FLOAT, -`col79` DOUBLE, -`col80` MEDIUMINT, -`col81` ENUM ('test1','test2','test3'), -`col82` VARCHAR (221), -`col83` BIGINT, -`col84` TINYINT, -`col85` BIGINT, -`col86` FLOAT, -`col87` MEDIUMBLOB, -`col88` CHAR (126), -`col89` MEDIUMBLOB, -`col90` DATETIME, -`col91` TINYINT, -`col92` DOUBLE, -`col93` NUMERIC, -`col94` DATE, -`col95` BLOB, -`col96` DATETIME, -`col97` TIME, -`col98` LONGBLOB, -`col99` INT, -`col100` SET ('test1','test2','test3'), -`col101` TINYBLOB, -`col102` INT, -`col103` MEDIUMBLOB, -`col104` MEDIUMTEXT, -`col105` FLOAT, -`col106` TINYBLOB, -`col107` VARCHAR (26), -`col108` TINYINT, -`col109` TIME, -`col110` TINYBLOB, -`col111` LONGBLOB, -`col112` TINYTEXT, -`col113` FLOAT, -`col114` TINYINT, -`col115` NUMERIC, -`col116` TIME, -`col117` SET ('test1','test2','test3'), -`col118` DATE, -`col119` SMALLINT, -`col120` BLOB, -`col121` TINYTEXT, -`col122` REAL, -`col123` YEAR, -`col124` REAL, -`col125` BOOL, -`col126` BLOB, -`col127` REAL, -`col128` MEDIUMBLOB, -`col129` TIMESTAMP, -`col130` LONGBLOB, -`col131` MEDIUMBLOB, -`col132` YEAR, -`col133` YEAR, -`col134` INT, -`col135` MEDIUMINT, -`col136` MEDIUMINT, -`col137` TINYTEXT, -`col138` TINYBLOB, -`col139` BLOB, -`col140` SET ('test1','test2','test3'), -`col141` ENUM ('test1','test2','test3'), -`col142` ENUM ('test1','test2','test3'), -`col143` TINYTEXT, -`col144` DATETIME, -`col145` TEXT, -`col146` DOUBLE PRECISION, -`col147` DECIMAL, -`col148` MEDIUMTEXT, -`col149` TINYTEXT, -`col150` SET ('test1','test2','test3'), -`col151` MEDIUMTEXT, -`col152` CHAR (126), -`col153` DOUBLE, -`col154` CHAR (243), -`col155` SET ('test1','test2','test3'), -`col156` SET ('test1','test2','test3'), -`col157` DATETIME, -`col158` DOUBLE, -`col159` NUMERIC, -`col160` DECIMAL, -`col161` FLOAT, -`col162` LONGBLOB, -`col163` LONGTEXT, -`col164` INT, -`col165` TIME, -`col166` CHAR (27), -`col167` VARCHAR (63), -`col168` TEXT, -`col169` TINYBLOB, -`col170` TINYBLOB, -`col171` ENUM ('test1','test2','test3'), -`col172` INT, -`col173` TIME, -`col174` DECIMAL, -`col175` DOUBLE, -`col176` MEDIUMBLOB, -`col177` LONGBLOB, -`col178` CHAR (43), -KEY `idx0` (`col131`(219)), -KEY `idx1` (`col67`,`col122`,`col59`,`col87`(33)), -KEY `idx2` (`col83`,`col42`,`col57`(152)), -KEY `idx3` (`col106`(124)), -KEY `idx4` (`col173`,`col80`,`col165`,`col89`(78)), -KEY `idx5` (`col174`,`col145`(108),`col23`(228),`col141`), -KEY `idx6` (`col157`,`col140`), -KEY `idx7` (`col130`(188),`col15`), -KEY `idx8` (`col52`), -KEY `idx9` (`col144`), -KEY `idx10` (`col155`), -KEY `idx11` (`col62`(230),`col1`(109)), -KEY `idx12` (`col151`(24),`col95`(85)), -KEY `idx13` (`col114`), -KEY `idx14` (`col42`,`col98`(56),`col146`), -KEY `idx15` (`col147`,`col39`(254),`col35`), -KEY `idx16` (`col79`), -KEY `idx17` (`col65`), -KEY `idx18` (`col149`(165),`col168`(119),`col32`,`col117`), -KEY `idx19` (`col64`), -KEY `idx20` (`col93`), -KEY `idx21` (`col64`,`col113`,`col104`(182)), -KEY `idx22` (`col52`,`col111`(189)), -KEY `idx23` (`col45`), -KEY `idx24` (`col154`,`col107`,`col110`(159)), -KEY `idx25` (`col149`(1),`col87`(131)), -KEY `idx26` (`col58`,`col115`,`col63`), -KEY `idx27` (`col95`(9),`col0`,`col87`(113)), -KEY `idx28` (`col92`,`col130`(1)), -KEY `idx29` (`col151`(129),`col137`(254),`col13`), -KEY `idx30` (`col49`), -KEY `idx31` (`col28`), -KEY `idx32` (`col83`,`col146`), -KEY `idx33` (`col155`,`col90`,`col17`(245)), -KEY `idx34` (`col174`,`col169`(44),`col107`), -KEY `idx35` (`col113`), -KEY `idx36` (`col52`), -KEY `idx37` (`col16`,`col120`(190)), -KEY `idx38` (`col28`), -KEY `idx39` (`col131`(165)), -KEY `idx40` (`col135`,`col26`(86)), -KEY `idx41` (`col69`,`col94`), -KEY `idx42` (`col105`,`col151`(38),`col97`), -KEY `idx43` (`col88`), -KEY `idx44` (`col176`(100),`col42`,`col73`(189),`col94`), -KEY `idx45` (`col2`(27),`col27`(116)) -)engine=innodb ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; - -DROP TABLE IF EXISTS table0; -DROP TABLE IF EXISTS table1; -DROP TABLE IF EXISTS table2; -DROP TABLE IF EXISTS table3; -DROP TABLE IF EXISTS table4; -DROP TABLE IF EXISTS table5; -DROP TABLE IF EXISTS table6; - -EVAL SET GLOBAL innodb_file_format=$file_format; -EVAL SET GLOBAL innodb_file_per_table=$file_per_table; diff --git a/mysql-test/t/innodb_bug40360.test b/mysql-test/t/innodb_bug40360.test deleted file mode 100644 index e88837aab4f..00000000000 --- a/mysql-test/t/innodb_bug40360.test +++ /dev/null @@ -1,16 +0,0 @@ -# -# Make sure http://bugs.mysql.com/40360 remains fixed. -# - --- source include/not_embedded.inc --- source include/have_innodb.inc - -SET TX_ISOLATION='READ-COMMITTED'; - -# This is the default since MySQL 5.1.29 SET BINLOG_FORMAT='STATEMENT'; - -CREATE TABLE bug40360 (a INT) engine=innodb; - -INSERT INTO bug40360 VALUES (1); - -DROP TABLE bug40360; diff --git a/mysql-test/t/innodb_bug41904.test b/mysql-test/t/innodb_bug41904.test deleted file mode 100644 index 365c5229adc..00000000000 --- a/mysql-test/t/innodb_bug41904.test +++ /dev/null @@ -1,14 +0,0 @@ -# -# Make sure http://bugs.mysql.com/41904 remains fixed. -# - --- source include/not_embedded.inc --- source include/have_innodb.inc - -CREATE TABLE bug41904 (id INT PRIMARY KEY, uniquecol CHAR(15)) ENGINE=InnoDB; - -INSERT INTO bug41904 VALUES (1,NULL), (2,NULL); - -CREATE UNIQUE INDEX ui ON bug41904 (uniquecol); - -DROP TABLE bug41904; diff --git a/mysql-test/t/innodb_bug44571.test b/mysql-test/t/innodb_bug44571.test deleted file mode 100644 index f5d79e3070a..00000000000 --- a/mysql-test/t/innodb_bug44571.test +++ /dev/null @@ -1,13 +0,0 @@ -# -# Bug#44571 InnoDB Plugin crashes on ADD INDEX -# http://bugs.mysql.com/44571 -# --- source include/have_innodb.inc - -CREATE TABLE bug44571 (foo INT) ENGINE=InnoDB; -ALTER TABLE bug44571 CHANGE foo bar INT; --- error ER_KEY_COLUMN_DOES_NOT_EXITS -ALTER TABLE bug44571 ADD INDEX bug44571b (foo); -ALTER TABLE bug44571 ADD INDEX bug44571b (bar); -CREATE INDEX bug44571c ON bug44571 (bar); -DROP TABLE bug44571; diff --git a/mysql-test/t/innodb_bug46676.test b/mysql-test/t/innodb_bug46676.test deleted file mode 100644 index 440666c4226..00000000000 --- a/mysql-test/t/innodb_bug46676.test +++ /dev/null @@ -1,16 +0,0 @@ -# This is the test for bug 46676: mysqld got exception 0xc0000005 -# It is reproducible with InnoDB plugin 1.0.4 + MySQL 5.1.37. -# But no longer reproducible after MySQL 5.1.38 (with plugin 1.0.5). - ---source include/have_innodb.inc - -SET foreign_key_checks=0; -CREATE TABLE t1 (id int, foreign key (id) references t2(id)) ENGINE=INNODB; -CREATE TABLE t2 (id int, foreign key (id) references t1(id)) ENGINE=INNODB; -SET foreign_key_checks=1; - -# Server crashes -SELECT COUNT(*) FROM information_schema.key_column_usage WHERE REFERENCED_TABLE_NAME in ('t1', 't2'); - -SET foreign_key_checks=0; -DROP TABLE t1, t2; diff --git a/mysql-test/t/innodb_information_schema.test b/mysql-test/t/innodb_information_schema.test deleted file mode 100644 index fc1d38d8d14..00000000000 --- a/mysql-test/t/innodb_information_schema.test +++ /dev/null @@ -1,149 +0,0 @@ -# -# Test that user data is correctly "visualized" in -# INFORMATION_SCHEMA.innodb_locks.lock_data -# - --- source include/have_innodb.inc - --- disable_query_log --- disable_result_log - -SET storage_engine=InnoDB; - --- disable_warnings -DROP TABLE IF EXISTS t_min, t_max; --- enable_warnings - -let $table_def = -( - c01 TINYINT, - c02 TINYINT UNSIGNED, - c03 SMALLINT, - c04 SMALLINT UNSIGNED, - c05 MEDIUMINT, - c06 MEDIUMINT UNSIGNED, - c07 INT, - c08 INT UNSIGNED, - c09 BIGINT, - c10 BIGINT UNSIGNED, - PRIMARY KEY(c01, c02, c03, c04, c05, c06, c07, c08, c09, c10) -); - --- eval CREATE TABLE t_min $table_def; -INSERT INTO t_min VALUES -(-128, 0, - -32768, 0, - -8388608, 0, - -2147483648, 0, - -9223372036854775808, 0); - --- eval CREATE TABLE t_max $table_def; -INSERT INTO t_max VALUES -(127, 255, - 32767, 65535, - 8388607, 16777215, - 2147483647, 4294967295, - 9223372036854775807, 18446744073709551615); - -CREATE TABLE ```t'\"_str` ( - c1 VARCHAR(32), - c2 VARCHAR(32), - c3 VARCHAR(32), - c4 VARCHAR(32), - c5 VARCHAR(32), - c6 VARCHAR(32), - c7 VARCHAR(32), - PRIMARY KEY(c1, c2, c3, c4, c5, c6, c7) -); -INSERT INTO ```t'\"_str` VALUES -('1', 'abc', '''abc', 'abc''', 'a''bc', 'a''bc''', '''abc'''''); -INSERT INTO ```t'\"_str` VALUES -('2', 'abc', '"abc', 'abc"', 'a"bc', 'a"bc"', '"abc""'); -INSERT INTO ```t'\"_str` VALUES -('3', 'abc', '\\abc', 'abc\\', 'a\\bc', 'a\\bc\\', '\\abc\\\\'); -INSERT INTO ```t'\"_str` VALUES -('4', 'abc', 0x00616263, 0x61626300, 0x61006263, 0x6100626300, 0x610062630000); - --- connect (con_lock,localhost,root,,) --- connect (con_min_trylock,localhost,root,,) --- connect (con_max_trylock,localhost,root,,) --- connect (con_str_insert_supremum,localhost,root,,) --- connect (con_str_lock_row1,localhost,root,,) --- connect (con_str_lock_row2,localhost,root,,) --- connect (con_str_lock_row3,localhost,root,,) --- connect (con_str_lock_row4,localhost,root,,) --- connect (con_verify_innodb_locks,localhost,root,,) - --- connection con_lock -SET autocommit=0; -SELECT * FROM t_min FOR UPDATE; -SELECT * FROM t_max FOR UPDATE; -SELECT * FROM ```t'\"_str` FOR UPDATE; - --- connection con_min_trylock --- send -SELECT * FROM t_min FOR UPDATE; - --- connection con_max_trylock --- send -SELECT * FROM t_max FOR UPDATE; - --- connection con_str_insert_supremum --- send -INSERT INTO ```t'\"_str` VALUES -('z', 'z', 'z', 'z', 'z', 'z', 'z'); - --- connection con_str_lock_row1 --- send -SELECT * FROM ```t'\"_str` WHERE c1 = '1' FOR UPDATE; - --- connection con_str_lock_row2 --- send -SELECT * FROM ```t'\"_str` WHERE c1 = '2' FOR UPDATE; - --- connection con_str_lock_row3 --- send -SELECT * FROM ```t'\"_str` WHERE c1 = '3' FOR UPDATE; - --- connection con_str_lock_row4 --- send -SELECT * FROM ```t'\"_str` WHERE c1 = '4' FOR UPDATE; - --- enable_result_log --- connection con_verify_innodb_locks -# Wait for the above queries to execute before continuing. -# Without this, it sometimes happens that the SELECT from innodb_locks -# executes before some of them, resulting in less than expected number -# of rows being selected from innodb_locks. If there is a bug and there -# are no 14 rows in innodb_locks then this test will fail with timeout. -let $count = 14; -let $table = INFORMATION_SCHEMA.INNODB_LOCKS; --- source include/wait_until_rows_count.inc -# the above enables the query log, re-disable it --- disable_query_log -SELECT lock_mode, lock_type, lock_table, lock_index, lock_rec, lock_data -FROM INFORMATION_SCHEMA.INNODB_LOCKS ORDER BY lock_data; - -SELECT lock_table,COUNT(*) FROM INFORMATION_SCHEMA.INNODB_LOCKS -GROUP BY lock_table; - -set @save_sql_mode = @@sql_mode; -SET SQL_MODE='ANSI_QUOTES'; -SELECT lock_table,COUNT(*) FROM INFORMATION_SCHEMA.INNODB_LOCKS -GROUP BY lock_table; -SET @@sql_mode=@save_sql_mode; --- disable_result_log - --- connection default - --- disconnect con_lock --- disconnect con_min_trylock --- disconnect con_max_trylock --- disconnect con_str_insert_supremum --- disconnect con_str_lock_row1 --- disconnect con_str_lock_row2 --- disconnect con_str_lock_row3 --- disconnect con_str_lock_row4 --- disconnect con_verify_innodb_locks - -DROP TABLE t_min, t_max, ```t'\"_str`; diff --git a/mysql-test/t/innodb_trx_weight.test b/mysql-test/t/innodb_trx_weight.test deleted file mode 100644 index b72eaad345f..00000000000 --- a/mysql-test/t/innodb_trx_weight.test +++ /dev/null @@ -1,108 +0,0 @@ -# -# Ensure that the number of locks (SELECT FOR UPDATE for example) is -# added to the number of altered rows when choosing the smallest -# transaction to kill as a victim when a deadlock is detected. -# Also transactions what had edited non-transactional tables should -# be heavier than ones that had not. -# - --- source include/have_innodb.inc - -SET storage_engine=InnoDB; - -# we do not really care about what gets printed, we are only -# interested in getting the deadlock resolved according to our -# expectations --- disable_query_log --- disable_result_log - -# we want to use "-- eval statement1; statement2" which does not work with -# prepared statements. Because this test should not behave differently with -# or without prepared statements we disable them so the test does not fail -# if someone runs ./mysql-test-run.pl --ps-protocol --- disable_ps_protocol - --- disable_warnings -DROP TABLE IF EXISTS t1, t2, t3, t4, t5_nontrans; --- enable_warnings - -# we will create a simple deadlock with t1, t2 and two connections -CREATE TABLE t1 (a INT); -CREATE TABLE t2 (a INT); - -# auxiliary table with a bulk of rows which will be locked by a -# transaction to increase its weight -CREATE TABLE t3 (a INT); - -# auxiliary empty table which will be inserted by a -# transaction to increase its weight -CREATE TABLE t4 (a INT); - -# auxiliary non-transactional table which will be edited by a -# transaction to tremendously increase its weight -CREATE TABLE t5_nontrans (a INT) ENGINE=MyISAM; - -INSERT INTO t1 VALUES (1); -INSERT INTO t2 VALUES (1); -# insert a lot of rows in t3 -INSERT INTO t3 VALUES (1); -INSERT INTO t3 SELECT * FROM t3; -INSERT INTO t3 SELECT * FROM t3; -INSERT INTO t3 SELECT * FROM t3; -INSERT INTO t3 SELECT * FROM t3; -INSERT INTO t3 SELECT * FROM t3; -INSERT INTO t3 SELECT * FROM t3; -INSERT INTO t3 SELECT * FROM t3; -INSERT INTO t3 SELECT * FROM t3; -INSERT INTO t3 SELECT * FROM t3; -INSERT INTO t3 SELECT * FROM t3; -INSERT INTO t3 SELECT * FROM t3; - -# test locking weight - --- let $con1_extra_sql = --- let $con1_extra_sql_present = 0 --- let $con2_extra_sql = SELECT * FROM t3 FOR UPDATE --- let $con2_extra_sql_present = 1 --- let $con1_should_be_rolledback = 1 --- source include/innodb_trx_weight.inc - --- let $con1_extra_sql = INSERT INTO t4 VALUES (1), (1) --- let $con1_extra_sql_present = 1 --- let $con2_extra_sql = SELECT * FROM t3 FOR UPDATE --- let $con2_extra_sql_present = 1 --- let $con1_should_be_rolledback = 1 --- source include/innodb_trx_weight.inc - --- let $con1_extra_sql = INSERT INTO t4 VALUES (1), (1), (1), (1), (1), (1) --- let $con1_extra_sql_present = 1 --- let $con2_extra_sql = SELECT * FROM t3 FOR UPDATE --- let $con2_extra_sql_present = 1 --- let $con1_should_be_rolledback = 0 --- source include/innodb_trx_weight.inc - -# test weight when non-transactional tables are edited - --- let $con1_extra_sql = INSERT INTO t4 VALUES (1), (1), (1) --- let $con1_extra_sql_present = 1 --- let $con2_extra_sql = --- let $con2_extra_sql_present = 0 --- let $con1_should_be_rolledback = 0 --- source include/innodb_trx_weight.inc - --- let $con1_extra_sql = INSERT INTO t4 VALUES (1), (1), (1) --- let $con1_extra_sql_present = 1 --- let $con2_extra_sql = INSERT INTO t5_nontrans VALUES (1) --- let $con2_extra_sql_present = 1 --- let $con1_should_be_rolledback = 1 --- source include/innodb_trx_weight.inc - --- let $con1_extra_sql = INSERT INTO t4 VALUES (1), (1), (1) --- let $con1_extra_sql = $con1_extra_sql; INSERT INTO t5_nontrans VALUES (1) --- let $con1_extra_sql_present = 1 --- let $con2_extra_sql = INSERT INTO t5_nontrans VALUES (1) --- let $con2_extra_sql_present = 1 --- let $con1_should_be_rolledback = 0 --- source include/innodb_trx_weight.inc - -DROP TABLE t1, t2, t3, t4, t5_nontrans; diff --git a/mysql-test/t/subselect_sj2.test b/mysql-test/t/subselect_sj2.test index d0794db68bb..0b5cb947588 100644 --- a/mysql-test/t/subselect_sj2.test +++ b/mysql-test/t/subselect_sj2.test @@ -61,6 +61,13 @@ insert into t3 select A.a + 10*B.a, A.a + 10*B.a, A.a + 10*B.a, A.a + 10*B.a from t0 A, t0 B where B.a <5; +# +# InnoDB does not use join buffer here, XtraDB does +# (despite the comment above which says "no join buffering", +# because it does not hold when this file is included +# into subselect_sj2_jcl6.test) +# +--replace_regex /Using join buffer// explain select * from t3 where b in (select a from t0); select * from t3 where b in (select A.a+B.a from t0 A, t0 B where B.a<5); |