Commit 6cf8c599 authored by Marko Mäkelä's avatar Marko Mäkelä

In tests, exercise the purge before dropping the tables

parent 9255bdb0
...@@ -56,7 +56,11 @@ SET GLOBAL innodb_flush_log_at_trx_commit=1; ...@@ -56,7 +56,11 @@ SET GLOBAL innodb_flush_log_at_trx_commit=1;
CREATE TABLE foo(a INT PRIMARY KEY) ENGINE=InnoDB; CREATE TABLE foo(a INT PRIMARY KEY) ENGINE=InnoDB;
# Kill the server # Kill the server
disconnect to_be_killed; disconnect to_be_killed;
SET @saved_frequency= @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
DROP TABLE foo; DROP TABLE foo;
InnoDB 0 transactions not purged
SET GLOBAL innodb_purge_rseg_truncate_frequency=@saved_frequency;
SELECT * FROM empty_REDUNDANT; SELECT * FROM empty_REDUNDANT;
id c2 d1 id c2 d1
SELECT * FROM once_REDUNDANT; SELECT * FROM once_REDUNDANT;
......
...@@ -15,6 +15,8 @@ connect analyze, localhost, root; ...@@ -15,6 +15,8 @@ connect analyze, localhost, root;
connection default; connection default;
SET timestamp = 42; SET timestamp = 42;
SET time_zone='+03:00'; SET time_zone='+03:00';
SET @saved_frequency= @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
let $format= 3; let $format= 3;
while ($format) { while ($format) {
...@@ -111,7 +113,6 @@ ALTER TABLE t1 DROP c3; ...@@ -111,7 +113,6 @@ ALTER TABLE t1 DROP c3;
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
SELECT * FROM t1; SELECT * FROM t1;
DROP TABLE t1;
eval CREATE TABLE t2 eval CREATE TABLE t2
(id INT primary key, c1 VARCHAR(4000), (id INT primary key, c1 VARCHAR(4000),
...@@ -165,7 +166,6 @@ connection default; ...@@ -165,7 +166,6 @@ connection default;
ALTER TABLE t2 DROP p; ALTER TABLE t2 DROP p;
--disable_info --disable_info
SELECT * FROM t2; SELECT * FROM t2;
DROP TABLE t2;
# datetime # datetime
eval CREATE TABLE t3 eval CREATE TABLE t3
...@@ -203,7 +203,6 @@ SELECT * FROM t3; ...@@ -203,7 +203,6 @@ SELECT * FROM t3;
ALTER TABLE t3 DROP c3, DROP c7; ALTER TABLE t3 DROP c3, DROP c7;
--disable_info --disable_info
SELECT * FROM t3; SELECT * FROM t3;
DROP TABLE t3;
eval CREATE TABLE big eval CREATE TABLE big
(id INT PRIMARY KEY, c1 VARCHAR(4000), c2 VARCHAR(4000), c3 VARCHAR(1000), (id INT PRIMARY KEY, c1 VARCHAR(4000), c2 VARCHAR(4000), c3 VARCHAR(1000),
...@@ -247,7 +246,8 @@ SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS ...@@ -247,7 +246,8 @@ SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big'; WHERE name = 'test/big';
connection default; connection default;
DROP TABLE big; --source include/wait_all_purged.inc
DROP TABLE t1,t2,t3,big;
dec $format; dec $format;
} }
...@@ -257,3 +257,4 @@ SET GLOBAL innodb_monitor_disable = module_ddl; ...@@ -257,3 +257,4 @@ SET GLOBAL innodb_monitor_disable = module_ddl;
SET GLOBAL innodb_monitor_enable = default; SET GLOBAL innodb_monitor_enable = default;
SET GLOBAL innodb_monitor_disable = default; SET GLOBAL innodb_monitor_disable = default;
--enable_warnings --enable_warnings
SET GLOBAL innodb_purge_rseg_truncate_frequency= @saved_frequency;
...@@ -51,7 +51,11 @@ CREATE TABLE foo(a INT PRIMARY KEY) ENGINE=InnoDB; ...@@ -51,7 +51,11 @@ CREATE TABLE foo(a INT PRIMARY KEY) ENGINE=InnoDB;
disconnect to_be_killed; disconnect to_be_killed;
--source include/start_mysqld.inc --source include/start_mysqld.inc
SET @saved_frequency= @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
DROP TABLE foo; DROP TABLE foo;
--source include/wait_all_purged.inc
SET GLOBAL innodb_purge_rseg_truncate_frequency=@saved_frequency;
let $format= 3; let $format= 3;
while ($format) { while ($format) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment