summaryrefslogtreecommitdiff
path: root/mysql-test/suite
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@oracle.com>2010-10-04 13:06:41 +0300
committerMarko Mäkelä <marko.makela@oracle.com>2010-10-04 13:06:41 +0300
commit190ebda206be4a8375976090c79e9cf89af4799e (patch)
tree2b7cea61c6e2486265b293f4eb915a199a3e2e4d /mysql-test/suite
parent678bc90ed8b416dbf68f590caae3a3d36c544b12 (diff)
downloadmariadb-git-190ebda206be4a8375976090c79e9cf89af4799e.tar.gz
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.
Diffstat (limited to 'mysql-test/suite')
-rw-r--r--mysql-test/suite/innodb_plugin/r/innodb_bug56716.result4
-rw-r--r--mysql-test/suite/innodb_plugin/t/innodb_bug56716.test10
2 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb_plugin/r/innodb_bug56716.result b/mysql-test/suite/innodb_plugin/r/innodb_bug56716.result
new file mode 100644
index 00000000000..50d83e8d87a
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/r/innodb_bug56716.result
@@ -0,0 +1,4 @@
+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;
+a b c
+DROP TABLE bug56716;
diff --git a/mysql-test/suite/innodb_plugin/t/innodb_bug56716.test b/mysql-test/suite/innodb_plugin/t/innodb_bug56716.test
new file mode 100644
index 00000000000..24e90f5acc5
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/t/innodb_bug56716.test
@@ -0,0 +1,10 @@
+#
+# Bug #56716 InnoDB locks a record gap without locking the table
+#
+-- source include/have_innodb_plugin.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;