summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2017-09-13 11:04:49 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2017-09-13 16:02:32 +0300
commit24062fed7026cd9a65864402a6a4761ef88ade39 (patch)
tree8bca57bc5e0ef749c161368b0aded74b2cbd81ce /mysql-test
parentd06e4fc6a36a5ef9e8c37c29acb143970f136f93 (diff)
downloadmariadb-git-24062fed7026cd9a65864402a6a4761ef88ade39.tar.gz
Remove the debug variables innodb_purge_stop_now, innodb_purge_run_now
The InnoDB purge subsystem can be best stopped by opening a read view, for example by START TRANSACTION WITH CONSISTENT SNAPSHOT. To ensure that everything is purged, use wait_all_purged.inc, which waits for the History list length in SHOW ENGINE INNODB STATUS to reach 0. Setting innodb_purge_run_now never guaranteed this.
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/suite/innodb/r/innodb-wl5522-debug.result9
-rw-r--r--mysql-test/suite/innodb/t/innodb-wl5522-debug.test9
-rw-r--r--mysql-test/suite/innodb_zip/r/wl5522_debug_zip.result9
-rw-r--r--mysql-test/suite/innodb_zip/t/wl5522_debug_zip.test9
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_purge_run_now_basic.result27
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_purge_stop_now_basic.result27
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_innodb.result28
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_purge_run_now_basic.test53
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_purge_stop_now_basic.test53
9 files changed, 28 insertions, 196 deletions
diff --git a/mysql-test/suite/innodb/r/innodb-wl5522-debug.result b/mysql-test/suite/innodb/r/innodb-wl5522-debug.result
index 4d748d6ebed..99e9c49eee9 100644
--- a/mysql-test/suite/innodb/r/innodb-wl5522-debug.result
+++ b/mysql-test/suite/innodb/r/innodb-wl5522-debug.result
@@ -494,7 +494,9 @@ c4 VARCHAR(2048),
INDEX idx1(c2),
INDEX idx2(c3(512)),
INDEX idx3(c4(512))) Engine=InnoDB;
-SET GLOBAL INNODB_PURGE_STOP_NOW=ON;
+connect purge_control,localhost,root;
+START TRANSACTION WITH CONSISTENT SNAPSHOT;
+connection default;
SET GLOBAL innodb_disable_background_merge=ON;
SET GLOBAL innodb_monitor_reset = ibuf_merges;
SET GLOBAL innodb_monitor_reset = ibuf_merges_insert;
@@ -659,7 +661,10 @@ FROM information_schema.innodb_metrics
WHERE name = 'ibuf_merges_inserts' AND count > 0;
name
SET GLOBAL innodb_disable_background_merge=OFF;
-SET GLOBAL INNODB_PURGE_RUN_NOW=ON;
+connection purge_control;
+COMMIT;
+disconnect purge_control;
+connection default;
DROP TABLE test_wl5522.t1;
CREATE TABLE test_wl5522.t1 (
c1 BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
diff --git a/mysql-test/suite/innodb/t/innodb-wl5522-debug.test b/mysql-test/suite/innodb/t/innodb-wl5522-debug.test
index 6b6506e8481..ca37521b9cf 100644
--- a/mysql-test/suite/innodb/t/innodb-wl5522-debug.test
+++ b/mysql-test/suite/innodb/t/innodb-wl5522-debug.test
@@ -1055,7 +1055,9 @@ CREATE TABLE test_wl5522.t1 (
INDEX idx3(c4(512))) Engine=InnoDB;
# Stop purge so that it doesn't remove the delete marked entries.
-SET GLOBAL INNODB_PURGE_STOP_NOW=ON;
+connect (purge_control,localhost,root);
+START TRANSACTION WITH CONSISTENT SNAPSHOT;
+connection default;
# Disable change buffer merge from the master thread, additionally
# enable aggressive flushing so that more changes are buffered.
@@ -1125,7 +1127,10 @@ SELECT name
SET GLOBAL innodb_disable_background_merge=OFF;
# Enable normal operation
-SET GLOBAL INNODB_PURGE_RUN_NOW=ON;
+connection purge_control;
+COMMIT;
+disconnect purge_control;
+connection default;
DROP TABLE test_wl5522.t1;
diff --git a/mysql-test/suite/innodb_zip/r/wl5522_debug_zip.result b/mysql-test/suite/innodb_zip/r/wl5522_debug_zip.result
index d20cc452612..394a2ea1f09 100644
--- a/mysql-test/suite/innodb_zip/r/wl5522_debug_zip.result
+++ b/mysql-test/suite/innodb_zip/r/wl5522_debug_zip.result
@@ -123,7 +123,9 @@ INDEX idx1(c2),
INDEX idx2(c3(512)),
INDEX idx3(c4(512))) Engine=InnoDB
ROW_FORMAT=COMPRESSED;
-SET GLOBAL INNODB_PURGE_STOP_NOW=ON;
+connect purge_control,localhost,root;
+START TRANSACTION WITH CONSISTENT SNAPSHOT;
+connection default;
SET GLOBAL innodb_disable_background_merge=ON;
SET GLOBAL innodb_monitor_reset = ibuf_merges;
SET GLOBAL innodb_monitor_reset = ibuf_merges_insert;
@@ -288,7 +290,10 @@ FROM information_schema.innodb_metrics
WHERE name = 'ibuf_merges_inserts' AND count > 0;
name
SET GLOBAL innodb_disable_background_merge=OFF;
-SET GLOBAL INNODB_PURGE_RUN_NOW=ON;
+connection purge_control;
+COMMIT;
+disconnect purge_control;
+connection default;
DROP TABLE test_wl5522.t1;
CREATE TABLE test_wl5522.t1 (
c1 BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
diff --git a/mysql-test/suite/innodb_zip/t/wl5522_debug_zip.test b/mysql-test/suite/innodb_zip/t/wl5522_debug_zip.test
index 0898a32fbf5..986c0508891 100644
--- a/mysql-test/suite/innodb_zip/t/wl5522_debug_zip.test
+++ b/mysql-test/suite/innodb_zip/t/wl5522_debug_zip.test
@@ -321,7 +321,9 @@ CREATE TABLE test_wl5522.t1 (
ROW_FORMAT=COMPRESSED;
# Stop purge so that it doesn't remove the delete marked entries.
-SET GLOBAL INNODB_PURGE_STOP_NOW=ON;
+connect (purge_control,localhost,root);
+START TRANSACTION WITH CONSISTENT SNAPSHOT;
+connection default;
# Disable change buffer merge from the master thread, additionally
# enable aggressive flushing so that more changes are buffered.
@@ -391,7 +393,10 @@ SELECT name
SET GLOBAL innodb_disable_background_merge=OFF;
# Enable normal operation
-SET GLOBAL INNODB_PURGE_RUN_NOW=ON;
+connection purge_control;
+COMMIT;
+disconnect purge_control;
+connection default;
DROP TABLE test_wl5522.t1;
diff --git a/mysql-test/suite/sys_vars/r/innodb_purge_run_now_basic.result b/mysql-test/suite/sys_vars/r/innodb_purge_run_now_basic.result
deleted file mode 100644
index 41204422767..00000000000
--- a/mysql-test/suite/sys_vars/r/innodb_purge_run_now_basic.result
+++ /dev/null
@@ -1,27 +0,0 @@
-SELECT name, count
-FROM information_schema.innodb_metrics
-WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
-name count
-purge_stop_count 0
-purge_resume_count 0
-SET @orig = @@global.innodb_purge_run_now;
-SELECT @orig;
-@orig
-0
-SET GLOBAL innodb_purge_stop_now = ON;
-SELECT name, count
-FROM information_schema.innodb_metrics
-WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
-name count
-purge_stop_count 1
-purge_resume_count 0
-SET GLOBAL innodb_purge_run_now = ON;
-SELECT @@global.innodb_purge_run_now;
-@@global.innodb_purge_run_now
-0
-SELECT name, count
-FROM information_schema.innodb_metrics
-WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
-name count
-purge_stop_count 1
-purge_resume_count 1
diff --git a/mysql-test/suite/sys_vars/r/innodb_purge_stop_now_basic.result b/mysql-test/suite/sys_vars/r/innodb_purge_stop_now_basic.result
deleted file mode 100644
index 41204422767..00000000000
--- a/mysql-test/suite/sys_vars/r/innodb_purge_stop_now_basic.result
+++ /dev/null
@@ -1,27 +0,0 @@
-SELECT name, count
-FROM information_schema.innodb_metrics
-WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
-name count
-purge_stop_count 0
-purge_resume_count 0
-SET @orig = @@global.innodb_purge_run_now;
-SELECT @orig;
-@orig
-0
-SET GLOBAL innodb_purge_stop_now = ON;
-SELECT name, count
-FROM information_schema.innodb_metrics
-WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
-name count
-purge_stop_count 1
-purge_resume_count 0
-SET GLOBAL innodb_purge_run_now = ON;
-SELECT @@global.innodb_purge_run_now;
-@@global.innodb_purge_run_now
-0
-SELECT name, count
-FROM information_schema.innodb_metrics
-WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
-name count
-purge_stop_count 1
-purge_resume_count 1
diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb.result b/mysql-test/suite/sys_vars/r/sysvars_innodb.result
index b2c8ada4b27..548142ef523 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_innodb.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_innodb.result
@@ -2274,34 +2274,6 @@ NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
-VARIABLE_NAME INNODB_PURGE_RUN_NOW
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
-VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BOOLEAN
-VARIABLE_COMMENT Set purge state to RUN
-NUMERIC_MIN_VALUE NULL
-NUMERIC_MAX_VALUE NULL
-NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST OFF,ON
-READ_ONLY NO
-COMMAND_LINE_ARGUMENT OPTIONAL
-VARIABLE_NAME INNODB_PURGE_STOP_NOW
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
-VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BOOLEAN
-VARIABLE_COMMENT Set purge state to STOP
-NUMERIC_MIN_VALUE NULL
-NUMERIC_MAX_VALUE NULL
-NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST OFF,ON
-READ_ONLY NO
-COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_PURGE_THREADS
SESSION_VALUE NULL
GLOBAL_VALUE 4
diff --git a/mysql-test/suite/sys_vars/t/innodb_purge_run_now_basic.test b/mysql-test/suite/sys_vars/t/innodb_purge_run_now_basic.test
deleted file mode 100644
index 0704784dbcc..00000000000
--- a/mysql-test/suite/sys_vars/t/innodb_purge_run_now_basic.test
+++ /dev/null
@@ -1,53 +0,0 @@
-#
-# Basic test for innodb_purge_run_now, note it is a duplicate of
-# innodb_purge_stop_now.
-#
-
--- source include/have_innodb.inc
-
-# The config variable is a debug variable for now
--- source include/have_debug.inc
-
---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;
---enable_query_log
-
-# Should be 0 for both
-SELECT name, count
- FROM information_schema.innodb_metrics
- WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
-
-# Check the default value
-SET @orig = @@global.innodb_purge_run_now;
-SELECT @orig;
-
-# Stop of purge
-SET GLOBAL innodb_purge_stop_now = ON;
-
-# Stop count should now be 1
-SELECT name, count
- FROM information_schema.innodb_metrics
- WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
-
-SET GLOBAL innodb_purge_run_now = ON;
-
-# Should always be OFF
-SELECT @@global.innodb_purge_run_now;
-
-# Both should be 1 now
-SELECT name, count
- FROM information_schema.innodb_metrics
- WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
-
---disable_query_log
-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
diff --git a/mysql-test/suite/sys_vars/t/innodb_purge_stop_now_basic.test b/mysql-test/suite/sys_vars/t/innodb_purge_stop_now_basic.test
deleted file mode 100644
index 0704784dbcc..00000000000
--- a/mysql-test/suite/sys_vars/t/innodb_purge_stop_now_basic.test
+++ /dev/null
@@ -1,53 +0,0 @@
-#
-# Basic test for innodb_purge_run_now, note it is a duplicate of
-# innodb_purge_stop_now.
-#
-
--- source include/have_innodb.inc
-
-# The config variable is a debug variable for now
--- source include/have_debug.inc
-
---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;
---enable_query_log
-
-# Should be 0 for both
-SELECT name, count
- FROM information_schema.innodb_metrics
- WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
-
-# Check the default value
-SET @orig = @@global.innodb_purge_run_now;
-SELECT @orig;
-
-# Stop of purge
-SET GLOBAL innodb_purge_stop_now = ON;
-
-# Stop count should now be 1
-SELECT name, count
- FROM information_schema.innodb_metrics
- WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
-
-SET GLOBAL innodb_purge_run_now = ON;
-
-# Should always be OFF
-SELECT @@global.innodb_purge_run_now;
-
-# Both should be 1 now
-SELECT name, count
- FROM information_schema.innodb_metrics
- WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
-
---disable_query_log
-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