Debian Codegraph @

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

raw
1 #
2 # Bug #29846292 ROLLBACK OF BIG TRANSACTION DUE TO CONFLICT REMAINS IN HUNG STATE
3 #
4 --source include/have_debug.inc
5 --source include/have_innodb_16k.inc
6
7 # Valgrind can hang or return spurious messages on DBUG_SUICIDE
8 --source include/not_valgrind.inc
9
10 SET GLOBAL innodb_compression_level = 0;
11 CREATE TABLE t1 (j1 JSON) ENGINE=InnoDB ROW_FORMAT=compressed;
12
13 SHOW CREATE TABLE t1;
14 # must be long enough to force external storage
15 SET @long_str = REPEAT('abcdefghijklmnopqrstuvwxyz1234', 60006);
16 # must be long enough to force new version (as opposed to storing diff in the undo log),
17 # but must be short enough to not cause complete rewrite of the blob
18 SET @medium_str_1 = REPEAT('a', 200);
19 SET @medium_str_2 = REPEAT('b', 200);
20 SET @json_doc = CONCAT('["', @long_str, '","', @medium_str_1 ,'" ]');
21
22 INSERT INTO t1 (j1) VALUES (@json_doc);
23
24 SELECT JSON_EXTRACT(j1, '$[1]') FROM t1;
25
26 START TRANSACTION;
27
28 UPDATE t1 SET j1 = JSON_REPLACE(j1, '$[1]', @medium_str_2);
29
30 SELECT JSON_EXTRACT(j1, '$[1]') FROM t1;
31 SET DEBUG = '+d,crash_middle_of_lob_rollback_6';
32 --source include/expect_crash.inc
33
34 --error CR_SERVER_LOST
35 ROLLBACK;
36
37
38 --echo # Verify that before the crash, we HAVE NOT reached 7-th iteration
39 let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
40 let SEARCH_PATTERN= Rolling back LOB for transaction \d+ undo number \d+ : current index length \d+\. \(iteration 7\);
41 --source include/search_pattern.inc
42
43
44 --source include/start_mysqld.inc
45
46 SELECT JSON_EXTRACT(j1, '$[1]') FROM t1 FOR UPDATE;
47 DROP TABLE t1;
48
49 SET GLOBAL innodb_compression_level = default;
50
51 --echo # Verify that after the restart, we HAVE reached 7-th iteration
52 --source include/search_pattern.inc