| 1 |
# |
| 2 |
# Basic test for innodb_purge_run_now, note it is a duplicate of |
| 3 |
# innodb_purge_stop_now. |
| 4 |
# |
| 5 |
|
| 6 |
|
| 7 |
# The config variable is a debug variable for now |
| 8 |
-- source include/have_debug.inc |
| 9 |
|
| 10 |
--disable_query_log |
| 11 |
# Enable metrics for the counters we are going to use |
| 12 |
set global innodb_monitor_enable = purge_stop_count; |
| 13 |
set global innodb_monitor_enable = purge_resume_count; |
| 14 |
--enable_query_log |
| 15 |
|
| 16 |
# Should be 0 for both |
| 17 |
SELECT name, count |
| 18 |
FROM information_schema.innodb_metrics |
| 19 |
WHERE name = 'purge_stop_count' OR name = 'purge_resume_count'; |
| 20 |
|
| 21 |
# Check the default value |
| 22 |
SET @orig = @@global.innodb_purge_run_now; |
| 23 |
SELECT @orig; |
| 24 |
|
| 25 |
# Stop of purge |
| 26 |
SET GLOBAL innodb_purge_stop_now = ON; |
| 27 |
|
| 28 |
# Stop count should now be 1 |
| 29 |
SELECT name, count |
| 30 |
FROM information_schema.innodb_metrics |
| 31 |
WHERE name = 'purge_stop_count' OR name = 'purge_resume_count'; |
| 32 |
|
| 33 |
SET GLOBAL innodb_purge_run_now = ON; |
| 34 |
|
| 35 |
# Should always be OFF |
| 36 |
SELECT @@global.innodb_purge_run_now; |
| 37 |
|
| 38 |
# Both should be 1 now |
| 39 |
SELECT name, count |
| 40 |
FROM information_schema.innodb_metrics |
| 41 |
WHERE name = 'purge_stop_count' OR name = 'purge_resume_count'; |
| 42 |
|
| 43 |
--disable_query_log |
| 44 |
set global innodb_monitor_disable = all; |
| 45 |
set global innodb_monitor_reset_all = all; |
| 46 |
|
| 47 |
--source include/innodb_monitor_restore.inc |