Debian Codegraph @

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

raw
1 --source include/have_innodb.inc
2 --source include/have_sequence.inc
3 --source include/have_debug.inc
4 --source include/have_debug_sync.inc
5
6 SET @save_limit=@@GLOBAL.innodb_limit_optimistic_insert_debug;
7 SET @save_size=@@GLOBAL.innodb_buffer_pool_size;
8 SET GLOBAL innodb_limit_optimistic_insert_debug=2;
9 SET GLOBAL innodb_buffer_pool_size=16777216;
10
11 call mtr.add_suppression("innodb_buffer_pool_size change aborted");
12
13 SET @old_innodb_adaptive_hash_index = @@innodb_adaptive_hash_index;
14 SET GLOBAL innodb_adaptive_hash_index = ON;
15 --error ER_WRONG_USAGE
16 SET STATEMENT debug_dbug='+d,buf_shrink_fail' FOR
17 SET GLOBAL innodb_buffer_pool_size=8388608;
18 SELECT @@GLOBAL.innodb_adaptive_hash_index,@@GLOBAL.innodb_buffer_pool_size;
19 SET GLOBAL innodb_adaptive_hash_index = @old_innodb_adaptive_hash_index;
20
21 CREATE TEMPORARY TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
22 INSERT INTO t1 SELECT seq FROM seq_1_to_200;
23
24 # Flush the buffer pool to prevent
25 # "innodb_buffer_pool_size change aborted" error with ./mtr --repeat=3
26 SET GLOBAL innodb_max_purge_lag_wait=0;
27 SET @save_pct= @@GLOBAL.innodb_max_dirty_pages_pct;
28 SET @save_pct_lwm= @@GLOBAL.innodb_max_dirty_pages_pct_lwm;
29 SET GLOBAL innodb_max_dirty_pages_pct_lwm = 0.0;
30 SET GLOBAL innodb_max_dirty_pages_pct = 0.0;
31
32 SHOW STATUS LIKE 'innodb_buffer_pool_resize_status';
33 connect con1,localhost,root;
34 SET DEBUG_SYNC='buf_pool_shrink_before_wakeup SIGNAL blocked WAIT_FOR go';
35 send SET GLOBAL innodb_buffer_pool_size=8388608;
36 connection default;
37 SET DEBUG_SYNC='now WAIT_FOR blocked';
38 # adjust for 32-bit and SUX_LOCK_GENERIC
39 --replace_regex /(5..)\/\1/505\/505/
40 SHOW STATUS LIKE 'innodb_buffer_pool_resize_status';
41 SET DEBUG_SYNC='now SIGNAL go';
42 connection con1;
43 reap;
44 disconnect con1;
45 connection default;
46 SHOW STATUS LIKE 'innodb_buffer_pool_resize_status';
47 SET DEBUG_SYNC=RESET;
48
49 SET GLOBAL innodb_max_dirty_pages_pct = @save_pct;
50 SET GLOBAL innodb_max_dirty_pages_pct_lwm = @save_pct_lwm;
51
52 SELECT COUNT(*),MIN(a),MAX(a) FROM t1;
53 DROP TEMPORARY TABLE t1;
54
55 SET GLOBAL innodb_limit_optimistic_insert_debug=@save_limit;
56 SET GLOBAL innodb_buffer_pool_size=@save_size;