Debian Codegraph @

mysql-test/suite/innodb/t/monitor_restart.test

raw
1 # Bug#22284224 - "REWRITE REPOPULATION OF CHARACTER SETS AND
2 # COLLATIONS DURING STARTUP" causes purge activity on every
3 # startup. So we need a debug way to stop purge
4 # The test can be made non-debug after fixing this bug
5 source include/have_debug.inc;
6
7 --echo #
8 --echo # BUG#20080942 - ADAPTIVE_HASH_SEARCHES_BTREE NOT UPDATED
9 --echo #
10
11 CREATE TABLE t1(a INT PRIMARY KEY, b BLOB) STATS_PERSISTENT=0;
12
13 # To make sure that the change buffer is empty
14 SET GLOBAL innodb_fast_shutdown=0;
15 --source include/restart_mysqld.inc
16
17 # temporary workaround for Bug#22284224
18 SET GLOBAL innodb_purge_stop_now = ON;
19
20 # To load mysql.* tables into cache
21 SELECT COUNT(*) FROM t1;
22
23 --disable_query_log
24 SET GLOBAL DEBUG='+d, non_ahi_search';
25 --enable_query_log
26
27 let $start=`SELECT COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME LIKE
28 'adaptive_hash_searches_btree' ORDER BY NAME`;
29
30 INSERT INTO t1 VALUES(1, 'abc');
31 INSERT INTO t1 VALUES(2, 'def');
32 INSERT INTO t1 VALUES(3, 'ghi');
33 SELECT * FROM t1;
34
35 --disable_query_log
36 SET GLOBAL DEBUG='-d, non_ahi_search';
37 --enable_query_log
38
39 let $end=`SELECT COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME LIKE
40 'adaptive_hash_searches_btree' ORDER BY NAME`;
41
42 let $diff=`SELECT $end-$start`;
43
44 if ($diff != 3) {
45 echo "Unexpected count: $diff";
46 }
47
48 DROP TABLE t1;
49 # temporary workaround for Bug#22284224
50 SET GLOBAL innodb_purge_run_now = ON;