diff options
author | unknown <knielsen@knielsen-hq.org> | 2011-04-29 16:16:42 +0200 |
---|---|---|
committer | unknown <knielsen@knielsen-hq.org> | 2011-04-29 16:16:42 +0200 |
commit | 8b046db411b963f48b06716fab764a35456c43d7 (patch) | |
tree | 3dff6535f6a0cc5b3ab3c2cc8ea32443d7010b79 /mysql-test | |
parent | 3a3a91ff051abe859589e33fab4b5588e325d55b (diff) | |
parent | fecd255a16fc3be6206e03ad5e70d8e90118acc6 (diff) | |
download | mariadb-git-8b046db411b963f48b06716fab764a35456c43d7.tar.gz |
Merge XtraDB from Percona Server 5.1.56-12.7 into MariaDB-5.1.
Diffstat (limited to 'mysql-test')
12 files changed, 93 insertions, 24 deletions
diff --git a/mysql-test/suite/percona/disabled.def b/mysql-test/suite/percona/disabled.def index a99b952a5eb..2155df55a7f 100644 --- a/mysql-test/suite/percona/disabled.def +++ b/mysql-test/suite/percona/disabled.def @@ -20,3 +20,4 @@ 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 +userstat_bug602047: Feature not merged into MariaDB diff --git a/mysql-test/suite/percona/innodb_fix_misc_bug51325.result b/mysql-test/suite/percona/innodb_fix_misc_bug51325.result new file mode 100644 index 00000000000..c63a33accdd --- /dev/null +++ b/mysql-test/suite/percona/innodb_fix_misc_bug51325.result @@ -0,0 +1,13 @@ +DROP TABLE IF EXISTS t1; +SET GLOBAL innodb_file_per_table=ON; +SHOW VARIABLES LIKE 'innodb_lazy_drop_table'; +Variable_name Value +innodb_lazy_drop_table 0 +SET GLOBAL innodb_lazy_drop_table=1; +SHOW VARIABLES LIKE 'innodb_lazy_drop_table'; +Variable_name Value +innodb_lazy_drop_table 1 +CREATE TABLE t1 (a INT) ENGINE=InnoDB; +DROP TABLE t1; +SET GLOBAL innodb_lazy_drop_table=default; +SET GLOBAL innodb_file_per_table=default; diff --git a/mysql-test/suite/percona/innodb_fix_misc_bug51325.test b/mysql-test/suite/percona/innodb_fix_misc_bug51325.test new file mode 100644 index 00000000000..78d6e60046a --- /dev/null +++ b/mysql-test/suite/percona/innodb_fix_misc_bug51325.test @@ -0,0 +1,13 @@ +# Test for 'innodb_lazy_drop_table' variable +--source include/have_innodb.inc +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings +SET GLOBAL innodb_file_per_table=ON; +SHOW VARIABLES LIKE 'innodb_lazy_drop_table'; +SET GLOBAL innodb_lazy_drop_table=1; +SHOW VARIABLES LIKE 'innodb_lazy_drop_table'; +CREATE TABLE t1 (a INT) ENGINE=InnoDB; +DROP TABLE t1; +SET GLOBAL innodb_lazy_drop_table=default; +SET GLOBAL innodb_file_per_table=default; diff --git a/mysql-test/suite/percona/show_slave_status_nolock.patch/percona_show_slave_status_nolock.result b/mysql-test/suite/percona/show_slave_status_nolock.patch/percona_show_slave_status_nolock.result index a028aeadde4..15cefd67c1e 100644 --- a/mysql-test/suite/percona/show_slave_status_nolock.patch/percona_show_slave_status_nolock.result +++ b/mysql-test/suite/percona/show_slave_status_nolock.patch/percona_show_slave_status_nolock.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); INSERT INTO t SELECT SLEEP(10); @@ -15,7 +11,11 @@ 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/show_slave_status_nolock.patch/percona_show_slave_status_nolock.test b/mysql-test/suite/percona/show_slave_status_nolock.patch/percona_show_slave_status_nolock.test index 9e856d24956..d8ae98262ea 100644 --- a/mysql-test/suite/percona/show_slave_status_nolock.patch/percona_show_slave_status_nolock.test +++ b/mysql-test/suite/percona/show_slave_status_nolock.patch/percona_show_slave_status_nolock.test @@ -45,3 +45,6 @@ connection slave; 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/slow_extended.patch/percona_slow_extended-slave_innodb_stats.result b/mysql-test/suite/percona/slow_extended.patch/percona_slow_extended-slave_innodb_stats.result index 162c92afbd9..c2292c4d2ac 100644 --- a/mysql-test/suite/percona/slow_extended.patch/percona_slow_extended-slave_innodb_stats.result +++ b/mysql-test/suite/percona/slow_extended.patch/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,9 @@ 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; diff --git a/mysql-test/suite/percona/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.result b/mysql-test/suite/percona/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.result index 386faf225ec..e96126e34c7 100644 --- a/mysql-test/suite/percona/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.result +++ b/mysql-test/suite/percona/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.result @@ -1,15 +1,12 @@ # 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; +include/master-slave.inc +[connection master] # Make table t for test 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 and change log_slow_slave_statements to ON on slave show variables like 'log_slow_slave_statements'; @@ -22,7 +19,9 @@ log_slow_slave_statements ON INSERT INTO t VALUES (2); # 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); show variables like 'long_query_time'; Variable_name Value @@ -91,3 +90,5 @@ FLUSH LOGS; 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/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.test b/mysql-test/suite/percona/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.test index b5a6154bbfc..755b83fa93b 100644 --- a/mysql-test/suite/percona/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.test +++ b/mysql-test/suite/percona/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.test @@ -111,3 +111,6 @@ DROP TABLE t; sync_slave_with_master; connection slave; + +STOP SLAVE; +-- source include/wait_for_slave_to_stop.inc diff --git a/mysql-test/suite/percona/slow_extended.patch/percona_slow_extended-slave_statements.result b/mysql-test/suite/percona/slow_extended.patch/percona_slow_extended-slave_statements.result index 9f9085ff444..6563d6d863e 100644 --- a/mysql-test/suite/percona/slow_extended.patch/percona_slow_extended-slave_statements.result +++ b/mysql-test/suite/percona/slow_extended.patch/percona_slow_extended-slave_statements.result @@ -1,15 +1,12 @@ # 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; +include/master-slave.inc +[connection master] # Make table t for test 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 @@ -26,7 +23,9 @@ INSERT INTO t VALUES (2); # 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 @@ -43,7 +42,9 @@ INSERT INTO t VALUES (4); # Sync slave(4) 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 (5); # Read information about master binlog # Sync slave(5) thread @@ -60,7 +61,9 @@ INSERT INTO t VALUES (6); # Sync slave(6) 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 (7); # Read information about master binlog # Sync slave(7) thread @@ -86,3 +89,5 @@ set global log_slow_slave_statements=OFF; DROP TABLE t; # Read information about master binlog # Sync slave(8) thread +STOP SLAVE; +include/wait_for_slave_to_stop.inc diff --git a/mysql-test/suite/percona/slow_extended.patch/percona_slow_extended-slave_statements.test b/mysql-test/suite/percona/slow_extended.patch/percona_slow_extended-slave_statements.test index bce7a5f0530..bdf37533933 100644 --- a/mysql-test/suite/percona/slow_extended.patch/percona_slow_extended-slave_statements.test +++ b/mysql-test/suite/percona/slow_extended.patch/percona_slow_extended-slave_statements.test @@ -163,3 +163,6 @@ 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)`; + +STOP SLAVE; +-- source include/wait_for_slave_to_stop.inc diff --git a/mysql-test/suite/percona/userstat_bug602047.result b/mysql-test/suite/percona/userstat_bug602047.result new file mode 100644 index 00000000000..bc14ca3362a --- /dev/null +++ b/mysql-test/suite/percona/userstat_bug602047.result @@ -0,0 +1,16 @@ +DROP TABLE IF EXISTS t1; +SET @userstat_running_old= @@userstat_running; +SET GLOBAL userstat_running=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_running= @userstat_running_old; +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..37c08d32bf0 --- /dev/null +++ b/mysql-test/suite/percona/userstat_bug602047.test @@ -0,0 +1,13 @@ +--source include/have_innodb.inc +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings +SET @userstat_running_old= @@userstat_running; +SET GLOBAL userstat_running=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_running= @userstat_running_old; +DROP TABLE t1; |