| 1 |
CREATE TABLE t1 (f1 INT PRIMARY KEY, f2 LONGBLOB, KEY(f2(50))) |
| 2 |
ENGINE=InnoDB; |
| 3 |
SHOW CREATE TABLE t1; |
| 4 |
Table Create Table |
| 5 |
t1 CREATE TABLE `t1` ( |
| 6 |
`f1` int NOT NULL, |
| 7 |
`f2` longblob, |
| 8 |
PRIMARY KEY (`f1`), |
| 9 |
KEY `f2` (`f2`(50)) |
| 10 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci |
| 11 |
START TRANSACTION; |
| 12 |
INSERT INTO t1 VALUES (1, REPEAT('abcdefghijklmnopqrstuvwxyz1234', 6006)); |
| 13 |
SET DEBUG = '+d,crash_middle_of_lob_rollback_6'; |
| 14 |
ROLLBACK; |
| 15 |
ERROR HY000: Lost connection to MySQL server during query |
| 16 |
# Verify that before the crash, we HAVE NOT reached the index length=4 yet |
| 17 |
Pattern "Rolling back LOB for transaction \d+ undo number \d+ : current index length 4\." not found |
| 18 |
# restart |
| 19 |
SELECT * FROM t1 FOR UPDATE; |
| 20 |
f1 f2 |
| 21 |
DROP TABLE t1; |
| 22 |
# Verify that after the restart, we HAVE reached the index length=4 |
| 23 |
Pattern "Rolling back LOB for transaction \d+ undo number \d+ : current index length 4\." found |