[MDEV-12880] INSERT DELAYED is not detected as inapplicable to a table under lock Created: 2017-05-23  Updated: 2020-12-17

Status: Open
Project: MariaDB Server
Component/s: Locking
Affects Version/s: 10.2
Fix Version/s: 10.2

Type: Bug Priority: Minor
Reporter: Elena Stepanova Assignee: Vladislav Vaintroub
Resolution: Unresolved Votes: 0
Labels: None


 Description   

Test case

--source include/have_innodb.inc
 
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
 
CREATE TABLE t1 (a INT, b CHAR(8)) ENGINE=InnoDB;
INSERT INTO t1 (a,b) VALUES (1,'f'),(2,'b');
 
LOCK TABLE t1 READ;
 
--connect (con0,localhost,root,,)
SET lock_wait_timeout = 1;
--error ER_DELAYED_NOT_SUPPORTED
INSERT DELAYED INTO t1 (a,b) VALUES (3,'c');
 
# Cleanup
--disconnect con0
--connection default
UNLOCK TABLES;
DROP TABLE t1;

In previous versions this test case would pass. Now instead of ER_DELAYED_NOT_SUPPORTED the INSERT DELAYED fails with ER_LOCK_WAIT_TIMEOUT.

Same happens with MERGE engine.

The change in behavior was introduced by this commit:

commit 8774a02364600279908bd9fb8b92d61dc4fcf60e
Author: Sergey Vojtovich <svoj@mariadb.org>
Date:   Thu Dec 8 14:20:46 2016 +0400
 
    MDEV-11227 - mysqlimport -l doesn't issue UNLOCK TABLES

It's not critical, but I want to make sure it was intentional, or at least expected side-effect.


Generated at Thu Feb 08 08:01:12 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.