Debian Codegraph @

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

raw
1 # Bug#34750489 : applying a updated online log may access out-of-bounds memory
2
3 --source include/have_debug.inc
4 --source include/have_debug_sync.inc
5 --source include/count_sessions.inc
6
7 show global variables like "innodb_sort_buffer_size";
8
9 connect(conn1,localhost,root,,);
10 connect(conn2,localhost,root,,);
11
12 connection default;
13 --disable_query_log
14 CREATE TABLE t1(
15 id INT,
16 name VARCHAR(1000),
17 g_col VARCHAR(20) GENERATED ALWAYS AS (concat(id, substr(`name`, 0, 10))) VIRTUAL,
18 KEY idx_id_g_col(id, g_col));
19
20 let $i= 0;
21 while ($i < 80)
22 {
23 eval INSERT INTO `t1`(id, name) VALUES($i, repeat("a",1000));
24 inc $i;
25 }
26 --enable_query_log
27
28 # main operation
29 connection conn1;
30 SET debug_sync = 'alter_table_update_log signal send_concurrent WAIT_FOR concurrent_done';
31 --send OPTIMIZE TABLE t1;
32
33 # concurrent operations
34 connection conn2;
35 SET debug_sync = 'now wait_for send_concurrent';
36 UPDATE t1 SET id = id + 1;
37 SET debug_sync = 'now signal concurrent_done';
38 disconnect conn2;
39
40 connection conn1;
41 reap;
42 disconnect conn1;
43
44 # teardown
45 connection default;
46
47 DROP TABLE t1;
48 --source include/wait_until_count_sessions.inc