Debian Codegraph @

mysql-test/suite/innodb/t/lob_rollback_crash_4.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 CREATE TABLE t1 (j1 JSON) ENGINE=InnoDB;
11
12 SHOW CREATE TABLE t1;
13 # must be long enough to force external storage
14 SET @long_str = REPEAT('abcdefghijklmnopqrstuvwxyz1234', 6006);
15 # must be long enough to force new version (as opposed to storing diff in the undo log),
16 # but must be short enough to not cause complete rewrite of the blob
17 SET @medium_str_1 = REPEAT('a', 200);
18 SET @medium_str_2 = REPEAT('b', 200);
19 SET @json_doc = CONCAT('["', @long_str, '","', @medium_str_1 ,'" ]');
20
21 INSERT INTO t1 (j1) VALUES (@json_doc);
22
23 SELECT JSON_EXTRACT(j1, '$[1]') FROM t1;
24
25 START TRANSACTION;
26
27 UPDATE t1 SET j1 = JSON_REPLACE(j1, '$[1]', @medium_str_2);
28
29 SELECT JSON_EXTRACT(j1, '$[1]') FROM t1;
30 SET DEBUG = '+d,crash_middle_of_lob_rollback_6';
31 --source include/expect_crash.inc
32
33 --error CR_SERVER_LOST
34 ROLLBACK;
35
36 --echo # Verify that before the crash, we HAVE NOT reached 7-th iteration
37 let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
38 let SEARCH_PATTERN= Rolling back LOB for transaction \d+ undo number \d+ : current index length \d+\. \(iteration 7\);
39 --source include/search_pattern.inc
40
41
42 --source include/start_mysqld.inc
43
44 SELECT JSON_EXTRACT(j1, '$[1]') FROM t1 FOR UPDATE;
45 DROP TABLE t1;
46
47 --echo # Verify that after the restart, we HAVE reached 7-th iteration
48 --source include/search_pattern.inc