mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 18:41:56 +01:00
a06da5c848
After a partial rollback, an undo log segment that is empty may carry a duplicate-looking top_undo_no. Adjust the debug assertions and add a test.
31 lines
620 B
Text
31 lines
620 B
Text
--source include/have_innodb.inc
|
|
|
|
CREATE TABLE t1 (i INT) ENGINE=InnoDB;
|
|
CREATE TABLE t2 (i INT) ENGINE=InnoDB;
|
|
|
|
CREATE OR REPLACE TRIGGER tr1
|
|
AFTER UPDATE ON t2
|
|
FOR EACH ROW
|
|
INSERT INTO tlog (i) VALUES (1);
|
|
|
|
INSERT IGNORE INTO t2 VALUES (1);
|
|
|
|
CREATE TRIGGER IF NOT EXISTS tr2
|
|
BEFORE INSERT ON t2
|
|
FOR EACH ROW
|
|
INSERT INTO tlog (i) VALUES (2);
|
|
|
|
START TRANSACTION;
|
|
INSERT INTO t1 VALUES (1);
|
|
--error ER_NO_SUCH_TABLE
|
|
UPDATE t2 SET i = 3;
|
|
INSERT INTO t1 VALUES (2);
|
|
--error ER_NO_SUCH_TABLE
|
|
INSERT INTO t2 VALUES (4);
|
|
UPDATE t1 SET i = 4 LIMIT 1;
|
|
COMMIT;
|
|
|
|
SELECT * FROM t1;
|
|
SELECT * FROM t2;
|
|
|
|
DROP TABLE t1,t2;
|