1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

MDEV-12004: Add the Bug#28825718 test case

Adapt the test case from
mysql/mysql-server@2bbbcddd90
(MySQL 5.7.26).
This commit is contained in:
Marko Mäkelä
2019-04-26 10:13:29 +03:00
parent 06ec56f579
commit c795a9f3fe
2 changed files with 63 additions and 1 deletions

View File

@@ -94,3 +94,33 @@ NULL
29
DROP TABLE t;
SET DEBUG_SYNC = 'RESET';
#
# Bug#28825718 - ASSERTION FAILURE: TRX0REC.CC:NNN:N_IDX > 0 WHILE DOING REPLACE/INSERT
#
CREATE TABLE t1(a INT PRIMARY KEY, b INT, c INT GENERATED ALWAYS AS(b+1) VIRTUAL) ENGINE=InnoDB;
INSERT INTO t1(a, b) VALUES(1, 1);
connect con1,localhost,root,,;
SET DEBUG_SYNC = 'row_log_apply_after SIGNAL s1 WAIT_FOR s2';
SET lock_wait_timeout = 1;
ALTER TABLE t1 ADD UNIQUE INDEX(c, b);
connection default;
SET DEBUG_SYNC = 'now WAIT_FOR s1';
SET DEBUG_SYNC = 'row_ins_sec_index_enter SIGNAL s2 WAIT_FOR s3';
INSERT INTO t1(a, b) VALUES(2, 2);
connection con1;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
SET DEBUG_SYNC = 'now SIGNAL s3';
disconnect con1;
connection default;
SET DEBUG_SYNC = 'RESET';
ALTER TABLE t1 ADD KEY(b);
INSERT INTO t1(a, b) VALUES(3, 3);
SELECT * FROM t1;
a b c
1 1 2
2 2 3
3 3 4
CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check status OK
DROP TABLE t1;