summaryrefslogtreecommitdiff
path: root/mysql-test/suite/innodb/r
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2017-03-18 21:37:36 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2017-03-18 21:37:36 +0200
commita06da5c848e6feeef0b1559e84479890a76c446e (patch)
tree3ed2b760fa9de81665cb8567177cf023545afe88 /mysql-test/suite/innodb/r
parent6c5cfbbf3399887baff489f089641385c112c9a0 (diff)
downloadmariadb-git-a06da5c848e6feeef0b1559e84479890a76c446e.tar.gz
MDEV-12258 InnoDB: Fix the bogus debug assertion introduced in MDEV-12219
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.
Diffstat (limited to 'mysql-test/suite/innodb/r')
-rw-r--r--mysql-test/suite/innodb/r/trigger_error.result28
1 files changed, 28 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb/r/trigger_error.result b/mysql-test/suite/innodb/r/trigger_error.result
new file mode 100644
index 00000000000..ef5f910e1a2
--- /dev/null
+++ b/mysql-test/suite/innodb/r/trigger_error.result
@@ -0,0 +1,28 @@
+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);
+UPDATE t2 SET i = 3;
+ERROR 42S02: Table 'test.tlog' doesn't exist
+INSERT INTO t1 VALUES (2);
+INSERT INTO t2 VALUES (4);
+ERROR 42S02: Table 'test.tlog' doesn't exist
+UPDATE t1 SET i = 4 LIMIT 1;
+COMMIT;
+SELECT * FROM t1;
+i
+4
+2
+SELECT * FROM t2;
+i
+1
+DROP TABLE t1,t2;