Debian Codegraph @

mysql-test/suite/innodb/t/lob_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 CREATE TABLE t1 (c1 LONGBLOB) ENGINE=InnoDB;
11
12 SHOW CREATE TABLE t1;
13 # must be long enough to force external storage
14 SET @long_str_1 = REPEAT('abcdefghijklmnopqrstuvwxyz1234', 6006);
15 # must be different enough to force creating new blob, as opposed to
16 # just a new version of old blob via partial update
17 SET @long_str_2 = REPEAT('1234abcdefghijklmnopqrstuvwxyz', 6006);
18
19 INSERT INTO t1 (c1) VALUES (@long_str_1);
20
21 SELECT SUBSTRING(c1, 1, 10) FROM t1;
22
23 START TRANSACTION;
24
25 UPDATE t1 SET c1 = @long_str_2;
26
27 SELECT SUBSTRING(c1, 1, 10) FROM t1;
28 SET DEBUG = '+d,crash_middle_of_lob_rollback_6';
29 --source include/expect_crash.inc
30
31 --error CR_SERVER_LOST
32 ROLLBACK;
33
34 --echo # Verify that before the crash, we HAVE NOT reached the index length=0 yet
35 let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
36
37 let SEARCH_PATTERN= Rolling back LOB for transaction \d+ undo number \d+ : current index length 0\.;
38 --source include/search_pattern.inc
39
40
41 --source include/start_mysqld.inc
42
43 SELECT SUBSTRING(c1, 1, 10) FROM t1 FOR UPDATE;
44 DROP TABLE t1;
45
46 --echo # Verify that after the restart, we HAVE reached the index length=0
47 --source include/search_pattern.inc