[MDEV-11635] innodb.innodb_mysql test hangs Created: 2016-12-22  Updated: 2016-12-22  Resolved: 2016-12-22

Status: Closed
Project: MariaDB Server
Component/s: Server
Affects Version/s: 10.2.3
Fix Version/s: 10.2.3

Type: Bug Priority: Major
Reporter: Marko Mäkelä Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: None
Environment:

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.



 Comments   
Comment by Marko Mäkelä [ 2016-12-22 ]

I copied and adapted the test from MySQL 5.7.17 to MariaDB 10.2.3.

Generated at Thu Feb 08 07:51:29 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.