| 1 |
# WL #15387: Innodb: Log progress information while resurrecting transaction during recovery. |
| 2 |
# Check whether the different resurrection logs are printed when a server crashes with an uncommitted transaction. |
| 3 |
CREATE TABLE IF NOT EXISTS t1 (col1 VARCHAR(60), col2 VARCHAR(60), col3 VARCHAR(60)); |
| 4 |
CREATE PROCEDURE bulk_ins() |
| 5 |
BEGIN |
| 6 |
DECLARE x INT; |
| 7 |
SET x = 1; |
| 8 |
lab: LOOP |
| 9 |
IF x > 50000 THEN |
| 10 |
LEAVE lab; |
| 11 |
END IF; |
| 12 |
INSERT INTO t1 VALUES (REPEAT('a', 60), REPEAT('b',60), REPEAT('c',60)); |
| 13 |
SET x = x + 1; |
| 14 |
END LOOP; |
| 15 |
END$$ |
| 16 |
CREATE PROCEDURE bulk_upd(n INTEGER) |
| 17 |
BEGIN |
| 18 |
DECLARE x INT; |
| 19 |
SET x = 1; |
| 20 |
lab: LOOP |
| 21 |
UPDATE t1 SET col1=REPEAT('b',60), col2=repeat('c',60), col3=repeat('a',60); |
| 22 |
UPDATE t1 SET col1=REPEAT('a',60), col2=repeat('b',60), col3=repeat('c',60); |
| 23 |
IF x > n THEN |
| 24 |
LEAVE lab; |
| 25 |
END IF; |
| 26 |
SET x = x + 1; |
| 27 |
END LOOP; |
| 28 |
END$$ |
| 29 |
BEGIN; |
| 30 |
CALL bulk_ins(); |
| 31 |
CALL bulk_upd(10); |
| 32 |
# Kill and restart: --log-error-verbosity=3 --debug=+d,resurrect_logs |
| 33 |
Pattern "Transaction ID:.* found for resurrecting inserts" found |
| 34 |
Pattern "Records read:.* - Pages read:.*" found |
| 35 |
Pattern "Transaction ID:.* found for resurrecting updates" found |
| 36 |
Pattern "Identified table ID:.* to acquire lock" found |
| 37 |
Pattern "Resurrected .* transaction.* doing inserts." found |
| 38 |
Pattern "Resurrected .* transaction.* doing updates." found |
| 39 |
Pattern "Acquired lock on table ID:.*, name:.*" found |
| 40 |
Pattern "Total records resurrected:.* - Total pages read:.* - Total tables acquired:.*" found |
| 41 |
DROP TABLE t1; |