Debian Codegraph @

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

raw
1 --source include/have_debug.inc
2
3 --echo # Test to check error message printed if both INSTANT and VERSION bits
4 --echo # are found set in record. This repro follows bug33788578 which will
5 --echo # come to the corresponding code path
6
7 --disable_query_log
8 call mtr.add_suppression("\\[Error\\] .*MY-\\d+.* Record has both instant and version bit set in Table *");
9 --enable_query_log
10
11 CREATE TABLE t1 (a TEXT) ENGINE=INNODB;
12 INSERT INTO t1 (a) VALUES ('foo');
13
14 ALTER TABLE t1 ADD COLUMN b INT DEFAULT 0, algorithm=instant;
15 SELECT * FROM t1;
16
17 --let $table_name = t1
18
19 connect (con1,localhost,root,,);
20
21 connection con1;
22
23 SET DEBUG_SYNC='innodb_inplace_alter_table_enter SIGNAL update_now WAIT_FOR update_done';
24 send;
25
26 ALTER TABLE t1 ADD PRIMARY KEY (b);
27
28 connection default;
29
30 SET DEBUG_SYNC='now WAIT_FOR update_now';
31
32 --source suite/innodb/include/print_instant_part_metadata.inc
33 SELECT * FROM t1;
34 SHOW CREATE TABLE t1;
35 CHECK TABLE t1;
36
37 --echo # Simulate both record and instant bits set when reading record
38
39 SET DEBUG = '+d,innodb_rec_instant_version_bit_set';
40
41 UPDATE t1 SET b = 1;
42
43 SET DEBUG = '-d,ER_IB_REC_INSTANT_VERSION_BIT_SET';
44
45 --source suite/innodb/include/print_instant_part_metadata.inc
46 SELECT * FROM t1;
47 SHOW CREATE TABLE t1;
48 CHECK TABLE t1;
49
50 SET DEBUG_SYNC='now SIGNAL update_done';
51
52 connection con1;
53 reap;
54
55 connection default;
56 disconnect con1;
57
58 --source suite/innodb/include/print_instant_part_metadata.inc
59 SELECT * FROM t1;
60 SHOW CREATE TABLE t1;
61 CHECK TABLE t1;
62
63 --let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err
64 --echo # Expect found
65 --let SEARCH_PATTERN= Record has both instant and version bit set in Table
66 --source include/search_pattern.inc
67
68 DROP TABLE t1;