@@ -5,7 +5,7 @@ FLUSH TABLES;
5
5
CREATE TABLE t1(id INT PRIMARY KEY, c2 INT UNIQUE)
6
6
ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
7
7
CREATE TABLE t2 LIKE t1;
8
- INSERT INTO t1 VALUES(1 ,2);
8
+ INSERT INTO t1 VALUES(0 ,2);
9
9
BEGIN;
10
10
INSERT INTO t2 VALUES(2,1);
11
11
ALTER TABLE t2 ADD COLUMN (c3 TEXT NOT NULL DEFAULT 'De finibus bonorum');
@@ -15,16 +15,17 @@ ALTER TABLE t1 ADD COLUMN (c3 TEXT NOT NULL DEFAULT ' et malorum');
15
15
connection default;
16
16
SET DEBUG_SYNC='now WAIT_FOR ddl';
17
17
SET GLOBAL innodb_flush_log_at_trx_commit=1;
18
- COMMIT ;
18
+ INSERT INTO t2 VALUES(3,4,'accusantium doloremque laudantium') ;
19
19
# Kill the server
20
20
disconnect ddl;
21
21
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
22
22
SELECT * FROM t1;
23
23
id c2
24
- 1 2
24
+ 0 2
25
25
SELECT * FROM t2;
26
26
id c2 c3
27
27
2 1 De finibus bonorum
28
+ 3 4 accusantium doloremque laudantium
28
29
BEGIN;
29
30
DELETE FROM t1;
30
31
ROLLBACK;
@@ -37,16 +38,18 @@ ALTER TABLE t2 DROP COLUMN c3, ADD COLUMN c5 TEXT DEFAULT 'naturam abhorrere';
37
38
connection default;
38
39
SET DEBUG_SYNC='now WAIT_FOR ddl';
39
40
SET GLOBAL innodb_flush_log_at_trx_commit=1;
40
- DELETE FROM t1 ;
41
+ UPDATE t1 SET c2=c2+1 ;
41
42
# Kill the server
42
43
disconnect ddl;
43
44
SET @saved_frequency= @@GLOBAL.innodb_purge_rseg_truncate_frequency;
44
45
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
45
46
SELECT * FROM t1;
46
47
id c2
48
+ 0 3
47
49
SELECT * FROM t2;
48
50
id c2 c3
49
51
2 1 De finibus bonorum
52
+ 3 4 accusantium doloremque laudantium
50
53
16 1551 Omnium enim rerum
51
54
128 1571 principia parva sunt
52
55
BEGIN;
@@ -67,11 +70,13 @@ DELETE FROM t1;
67
70
disconnect ddl;
68
71
SET @saved_frequency= @@GLOBAL.innodb_purge_rseg_truncate_frequency;
69
72
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
73
+ FOUND 3 /\[Note\] InnoDB: Rolled back recovered transaction / in mysqld.1.err
70
74
SELECT * FROM t1;
71
75
id c2
72
76
SELECT * FROM t2;
73
77
id c2
74
78
2 1
79
+ 3 4
75
80
64 42
76
81
16 1551
77
82
128 1571
@@ -87,7 +92,7 @@ N_RECS=0; LEVEL=0
87
92
header=0x010000030074 (id=0x696e66696d756d00)
88
93
header=0x010008030000 (id=0x73757072656d756d00)
89
94
t2 clustered index root page(type 18):
90
- N_RECS=6 ; LEVEL=0
95
+ N_RECS=7 ; LEVEL=0
91
96
header=0x01000003008f (id=0x0000000000000000)
92
97
header=0x3000100c00d4 (id=0x80000000,
93
98
DB_TRX_ID=0x000000000000,
@@ -99,26 +104,31 @@ header=0x0000180900f4 (id=0x80000002,
99
104
DB_TRX_ID=0x000000000000,
100
105
DB_ROLL_PTR=0x80000000000000,
101
106
c2=0x80000001)
102
- header=0x0000200b0124 (id=0x80000010,
107
+ header=0x0000200b0135 (id=0x80000003,
108
+ DB_TRX_ID=0x000000000000,
109
+ DB_ROLL_PTR=0x80000000000000,
110
+ c2=0x80000004,
111
+ c3=0x6163637573616e7469756d20646f6c6f72656d717565206c617564616e7469756d)
112
+ header=0x0000280b0165 (id=0x80000010,
103
113
DB_TRX_ID=0x000000000000,
104
114
DB_ROLL_PTR=0x80000000000000,
105
115
c2=0x8000060f,
106
116
c3=0x4f6d6e69756d20656e696d20726572756d)
107
- header=0x000028090144 (id=0x80000040,
117
+ header=0x000030090185 (id=0x80000040,
108
118
DB_TRX_ID=0x000000000000,
109
119
DB_ROLL_PTR=0x80000000000000,
110
120
c2=0x8000002a)
111
- header=0x0000300b0179 (id=0x80000080,
121
+ header=0x0000380b01ba (id=0x80000080,
112
122
DB_TRX_ID=0x000000000000,
113
123
DB_ROLL_PTR=0x80000000000000,
114
124
c2=0x80000623,
115
125
c3=0x207072696e63697069612070617276612073756e74)
116
- header=0x0000380b0074 (id=0x8000015b,
126
+ header=0x0000400b0074 (id=0x8000015b,
117
127
DB_TRX_ID=0x000000000000,
118
128
DB_ROLL_PTR=0x80000000000000,
119
129
c2=0x8000814d,
120
130
c3=0x206574206d616c6f72756d)
121
- header=0x070008030000 (id=0x000000000000000100)
131
+ header=0x080008030000 (id=0x000000000000000100)
122
132
UNLOCK TABLES;
123
133
DELETE FROM t2;
124
134
InnoDB 0 transactions not purged
0 commit comments