summaryrefslogtreecommitdiff
path: root/mysql-test/t/lock_tables_lost_commit.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/lock_tables_lost_commit.test')
-rw-r--r--mysql-test/t/lock_tables_lost_commit.test18
1 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/t/lock_tables_lost_commit.test b/mysql-test/t/lock_tables_lost_commit.test
new file mode 100644
index 00000000000..a12ee7369cb
--- /dev/null
+++ b/mysql-test/t/lock_tables_lost_commit.test
@@ -0,0 +1,18 @@
+# This is a test for bug 578
+
+connect (con1,localhost,root,,);
+connect (con2,localhost,root,,);
+
+connection con1;
+drop table if exists t1;
+create table t1(a int) type=innodb;
+lock tables t1 write;
+insert into t1 values(10);
+disconnect con1;
+
+connection con2;
+# The bug was that, because of the LOCK TABLES, the handler "forgot" to commit,
+# and the other commit when we write to the binlog was not done because of
+# binlog-ignore-db
+select * from t1;
+drop table t1;