1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Bug #53757 assert in mysql_truncate_by_delete

The assert was triggered if a connection executing TRUNCATE
on a InnoDB table was killed during open_tables.

This bug was fixed in the scope of Bug #45643
"InnoDB does not support replication of TRUNCATE TABLE".

This patch adds test coverage to innodb_mysql_sync.test.
This commit is contained in:
Jon Olav Hauglid
2010-06-25 09:07:18 +02:00
parent be3005d9e7
commit 9702d53ff8
3 changed files with 45 additions and 0 deletions

View File

@ -48,3 +48,21 @@ Warnings:
Error 1146 Table 'test.t1' doesn't exist
# Connection default
SET DEBUG_SYNC= "RESET";
#
# Bug#53757 assert in mysql_truncate_by_delete
#
DROP TABLE IF EXISTS t1, t2;
CREATE TABLE t1(a INT) Engine=InnoDB;
CREATE TABLE t2(id INT);
INSERT INTO t1 VALUES (1), (2);
INSERT INTO t2 VALUES(connection_id());
SET DEBUG_SYNC= "open_and_process_table SIGNAL opening WAIT_FOR killed";
# Sending: (not reaped since connection is killed later)
TRUNCATE t1;
SET DEBUG_SYNC= "now WAIT_FOR opening";
SELECT ((@id := id) - id) FROM t2;
((@id := id) - id)
0
KILL @id;
SET DEBUG_SYNC= "now SIGNAL killed";
DROP TABLE t1, t2;