Commit d61c5696 authored by Marko Mäkelä's avatar Marko Mäkelä

Make a test more robust

Change buffering will occasionally happen if other pages are
not flushed quickly enough.
parent 00cd53d3
...@@ -488,8 +488,6 @@ INDEX idx3(c4(512))) Engine=InnoDB; ...@@ -488,8 +488,6 @@ INDEX idx3(c4(512))) Engine=InnoDB;
connect purge_control,localhost,root; connect purge_control,localhost,root;
START TRANSACTION WITH CONSISTENT SNAPSHOT; START TRANSACTION WITH CONSISTENT SNAPSHOT;
connection default; connection default;
SET GLOBAL innodb_monitor_reset = ibuf_merges;
SET GLOBAL innodb_monitor_reset = ibuf_merges_insert;
INSERT INTO t1 INSERT INTO t1
SELECT 1 + seq, 1 + (seq MOD 4), SELECT 1 + seq, 1 + (seq MOD 4),
REPEAT(SUBSTR('abcd', 1 + (seq MOD 4), 1), 2048), REPEAT(SUBSTR('abcd', 1 + (seq MOD 4), 1), 2048),
...@@ -660,22 +658,9 @@ COUNT(*) ...@@ -660,22 +658,9 @@ COUNT(*)
SELECT SUM(c2) FROM t1; SELECT SUM(c2) FROM t1;
SUM(c2) SUM(c2)
124160 124160
SELECT name
FROM information_schema.innodb_metrics
WHERE name = 'ibuf_merges_insert' AND count = 0;
name
ibuf_merges_insert
FLUSH TABLES t1 FOR EXPORT; FLUSH TABLES t1 FOR EXPORT;
backup: t1 backup: t1
UNLOCK TABLES; UNLOCK TABLES;
SELECT name
FROM information_schema.innodb_metrics
WHERE name = 'ibuf_merges' AND count > 0;
name
SELECT name
FROM information_schema.innodb_metrics
WHERE name = 'ibuf_merges_inserts' AND count > 0;
name
connection purge_control; connection purge_control;
COMMIT; COMMIT;
disconnect purge_control; disconnect purge_control;
...@@ -954,10 +939,4 @@ SET SESSION debug_dbug=@saved_debug_dbug; ...@@ -954,10 +939,4 @@ SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE t1; DROP TABLE t1;
unlink: t1.ibd unlink: t1.ibd
unlink: t1.cfg unlink: t1.cfg
set global innodb_monitor_disable = all;
set global innodb_monitor_reset_all = all;
set global innodb_monitor_enable = default;
set global innodb_monitor_disable = default;
set global innodb_monitor_reset = default;
set global innodb_monitor_reset_all = default;
SET GLOBAL INNODB_FILE_PER_TABLE=@file_per_table; SET GLOBAL INNODB_FILE_PER_TABLE=@file_per_table;
...@@ -1016,14 +1016,6 @@ EOF ...@@ -1016,14 +1016,6 @@ EOF
DROP TABLE t1; DROP TABLE t1;
--disable_query_log
# Enable metrics for the counters we are going to use
set global innodb_monitor_enable = purge_stop_count;
set global innodb_monitor_enable = purge_resume_count;
set global innodb_monitor_enable = ibuf_merges;
set global innodb_monitor_enable = ibuf_merges_insert;
--enable_query_log
# #
# Create a large table with delete marked records, disable purge during # Create a large table with delete marked records, disable purge during
# the update so that we can test the IMPORT purge code. # the update so that we can test the IMPORT purge code.
...@@ -1042,9 +1034,6 @@ connect (purge_control,localhost,root); ...@@ -1042,9 +1034,6 @@ connect (purge_control,localhost,root);
START TRANSACTION WITH CONSISTENT SNAPSHOT; START TRANSACTION WITH CONSISTENT SNAPSHOT;
connection default; connection default;
SET GLOBAL innodb_monitor_reset = ibuf_merges;
SET GLOBAL innodb_monitor_reset = ibuf_merges_insert;
INSERT INTO t1 INSERT INTO t1
SELECT 1 + seq, 1 + (seq MOD 4), SELECT 1 + seq, 1 + (seq MOD 4),
REPEAT(SUBSTR('abcd', 1 + (seq MOD 4), 1), 2048), REPEAT(SUBSTR('abcd', 1 + (seq MOD 4), 1), 2048),
...@@ -1075,10 +1064,6 @@ SELECT c1, c2 FROM t1; ...@@ -1075,10 +1064,6 @@ SELECT c1, c2 FROM t1;
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
SELECT SUM(c2) FROM t1; SELECT SUM(c2) FROM t1;
SELECT name
FROM information_schema.innodb_metrics
WHERE name = 'ibuf_merges_insert' AND count = 0;
FLUSH TABLES t1 FOR EXPORT; FLUSH TABLES t1 FOR EXPORT;
perl; perl;
...@@ -1088,14 +1073,6 @@ EOF ...@@ -1088,14 +1073,6 @@ EOF
UNLOCK TABLES; UNLOCK TABLES;
SELECT name
FROM information_schema.innodb_metrics
WHERE name = 'ibuf_merges' AND count > 0;
SELECT name
FROM information_schema.innodb_metrics
WHERE name = 'ibuf_merges_inserts' AND count > 0;
# Enable normal operation # Enable normal operation
connection purge_control; connection purge_control;
COMMIT; COMMIT;
...@@ -1385,21 +1362,9 @@ do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; ...@@ -1385,21 +1362,9 @@ do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
ib_unlink_tablespace("test", "t1"); ib_unlink_tablespace("test", "t1");
EOF EOF
set global innodb_monitor_disable = all;
set global innodb_monitor_reset_all = all;
-- disable_warnings
set global innodb_monitor_enable = default;
set global innodb_monitor_disable = default;
set global innodb_monitor_reset = default;
set global innodb_monitor_reset_all = default;
-- enable_warnings
--disable_query_log --disable_query_log
call mtr.add_suppression("InnoDB: The log sequence numbers [0-9]+ and [0-9]+ in ibdata files do not match the log sequence number [0-9]+ in the ib_logfiles!"); call mtr.add_suppression("InnoDB: The log sequence numbers [0-9]+ and [0-9]+ in ibdata files do not match the log sequence number [0-9]+ in the ib_logfiles!");
call mtr.add_suppression("'Resource temporarily unavailable'"); call mtr.add_suppression("'Resource temporarily unavailable'");
call mtr.add_suppression("Monitor ibuf_merges is already enabled");
call mtr.add_suppression("Monitor ibuf_merges_insert is already enabled");
call mtr.add_suppression("Got error -1 when reading table '.*'"); call mtr.add_suppression("Got error -1 when reading table '.*'");
call mtr.add_suppression("InnoDB: Table '.*' tablespace is set as discarded."); call mtr.add_suppression("InnoDB: Table '.*' tablespace is set as discarded.");
call mtr.add_suppression("InnoDB: Tablespace '.*' exists in the cache.*"); call mtr.add_suppression("InnoDB: Tablespace '.*' exists in the cache.*");
......
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