mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
MDEV-17470 Orphan temporary files after interrupted ALTER cause InnoDB: Operating system error number 17 and eventual fatal error 71
Orphan #sql* tables may remain after ALTER TABLE was interrupted by timeout or KILL or client disconnect. This is a regression caused by MDEV-16515. Similar to temporary tables (MDEV-16647), we had better ignore the KILL when dropping the original table in the final part of ALTER TABLE. Closes #1020
This commit is contained in:
committed by
Marko Mäkelä
parent
9ad1663f78
commit
c5a5eaa9a9
@@ -100,3 +100,31 @@ DROP TABLE t1;
|
||||
|
||||
# Wait till all disconnects are completed
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-17470 Orphan temporary files after interrupted ALTER
|
||||
--echo # cause InnoDB: Operating system error number 17 and eventual
|
||||
--echo # fatal error 71
|
||||
--echo #
|
||||
CREATE TABLE t1 (pk INT AUTO_INCREMENT PRIMARY KEY, i INT) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (NULL,1),(NULL,2),(NULL,3),(NULL,4),(NULL,5),(NULL,6),(NULL,7),(NULL,8);
|
||||
INSERT INTO t1 SELECT NULL, i FROM t1;
|
||||
INSERT INTO t1 SELECT NULL, i FROM t1;
|
||||
INSERT INTO t1 SELECT NULL, i FROM t1;
|
||||
INSERT INTO t1 SELECT NULL, i FROM t1;
|
||||
INSERT INTO t1 SELECT NULL, i FROM t1;
|
||||
|
||||
LOCK TABLE t1 READ;
|
||||
|
||||
--connect (con1,localhost,root,,test)
|
||||
SET max_statement_time= 1;
|
||||
--error ER_STATEMENT_TIMEOUT
|
||||
ALTER TABLE t1 FORCE, ALGORITHM=COPY;
|
||||
SET DEBUG_SYNC = 'now SIGNAL stop_waining';
|
||||
--disconnect con1
|
||||
|
||||
--connection default
|
||||
SET DEBUG_SYNC = 'now WAIT_FOR stop_waining';
|
||||
UNLOCK TABLES;
|
||||
DROP TABLE t1;
|
||||
SET DEBUG_SYNC = 'RESET';
|
||||
|
||||
Reference in New Issue
Block a user