1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Bug#56716 InnoDB locks a record gap without locking the table

row_search_for_mysql(): Acquire an intention lock on the table
before locking the first record gap.
This commit is contained in:
Marko Mäkelä
2010-10-04 13:05:21 +03:00
parent 282eee8879
commit 678bc90ed8
3 changed files with 50 additions and 36 deletions

View File

@ -0,0 +1,10 @@
#
# Bug #56716 InnoDB locks a record gap without locking the table
#
-- source include/have_innodb.inc
CREATE TABLE bug56716 (a INT PRIMARY KEY,b INT,c INT,INDEX(b)) ENGINE=InnoDB;
SELECT * FROM bug56716 WHERE b<=42 ORDER BY b DESC FOR UPDATE;
DROP TABLE bug56716;