Debian Codegraph @

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

raw
1 --source include/have_debug.inc
2 --source include/count_sessions.inc
3
4 CREATE TABLE `t1` (
5 `a` int NOT NULL,
6 `b` text,
7 `c` text,
8 PRIMARY KEY (`a`)
9 ) ENGINE=InnoDB;
10
11 # Prepare Data.
12
13 --disable_query_log
14 let $i= 0;
15 while ($i < 125)
16 {
17 if ($i == 23)
18 {
19 eval INSERT INTO `t1` VALUES($i, repeat("a",32768),repeat("b",32768));
20 }
21
22 if ($i != 23)
23 {
24 eval INSERT INTO `t1` VALUES($i, repeat("a",49152),repeat("b",49152));
25 }
26 inc $i;
27 }
28 --enable_query_log
29
30 connect(conn1,localhost,root,,);
31 connection default;
32 # disable purge thread to construct `update on delete mark record`
33 SET global innodb_purge_stop_now=ON;
34 DELETE FROM t1 WHERE a = 24;
35
36 connection conn1;
37 BEGIN;
38 INSERT INTO `t1` VALUES(24, repeat("c",49152),repeat("d",49152));
39
40 # enable purge thread to update purge's view.
41 SET global innodb_purge_run_now=ON;
42 --source include/wait_innodb_all_purged.inc
43
44 # rollback for undo `TRX_UNDO_UPD_DEL_REC`
45 ROLLBACK;
46
47 connection default;
48 disconnect conn1;
49 DROP TABLE t1;
50 --source include/count_sessions.inc
51