Skip to content

Commit

Permalink
Fix an occasional timeout in innodb.alter_partitioned
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-m committed Sep 11, 2021
1 parent d09426f commit ac064c2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mysql-test/suite/innodb/r/alter_partitioned.result
Expand Up @@ -11,6 +11,8 @@ SAVEPOINT sp;
INSERT INTO t1 (pk) VALUES (1);
ROLLBACK TO SAVEPOINT sp;
connection default;
SET @save_timeout=@@lock_wait_timeout;
SET @save_innodb_timeout=@@innodb_lock_wait_timeout;
SET lock_wait_timeout=0;
Warnings:
Warning 1292 Truncated incorrect lock_wait_timeout value: '0'
Expand All @@ -19,6 +21,8 @@ Warnings:
Warning 1292 Truncated incorrect innodb_lock_wait_timeout value: '0'
ALTER TABLE t1 PARTITION BY HASH(pk);
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
SET lock_wait_timeout=@save_timeout;
SET innodb_lock_wait_timeout=@save_innodb_timeout;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
Expand Down
4 changes: 4 additions & 0 deletions mysql-test/suite/innodb/t/alter_partitioned.test
Expand Up @@ -18,10 +18,14 @@ INSERT INTO t1 (pk) VALUES (1);
ROLLBACK TO SAVEPOINT sp;

--connection default
SET @save_timeout=@@lock_wait_timeout;
SET @save_innodb_timeout=@@innodb_lock_wait_timeout;
SET lock_wait_timeout=0;
SET innodb_lock_wait_timeout=0;
--error ER_LOCK_WAIT_TIMEOUT
ALTER TABLE t1 PARTITION BY HASH(pk);
SET lock_wait_timeout=@save_timeout;
SET innodb_lock_wait_timeout=@save_innodb_timeout;

SHOW CREATE TABLE t1;
--connection con1
Expand Down

0 comments on commit ac064c2

Please sign in to comment.