Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.2.3
-
None
-
Debian GNU/Linux unstable
Description
The following test (adapted from innodb.innodb_mysql) reports a timeout for LOCK TABLES:
--source include/have_innodb.inc
|
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
CREATE TABLE t2 (a INT) ENGINE=InnoDB;
|
SET AUTOCOMMIT=0;
|
INSERT INTO t2 VALUES (1);
|
CONNECT c1,localhost,root,,;
|
SET AUTOCOMMIT=0;
|
SET lock_wait_timeout=1;
|
LOCK TABLES t1 READ, t2 READ;
|
disconnect c1;
|
connection default;
|
DROP TABLE t1,t2;
|
In 10.2, this will fail as follows:
mysqltest: At line 9: query 'LOCK TABLES t1 READ, t2 READ' failed: 1205: Lock wait timeout exceeded; try restarting transaction
|
In MariaDB 10.2, the test innodb.innodb_mysql would hang because a change with the two SET statements below was not merged from MySQL 5.7 commit 704231728c05:
SET @old_lock_wait_timeout= @@lock_wait_timeout;
|
SET lock_wait_timeout= 1;
|
--error ER_LOCK_WAIT_TIMEOUT
|
LOCK TABLES t1 READ, t2 READ;
|
Possibly the following change was merged incorrectly from MySQL 5.7:
WL#6671: Improve scalability by not using thr_lock.c locks for InnoDB tables
It mentions a change to the LOCK TABLES…READ behaviour.