summaryrefslogtreecommitdiff
path: root/mysql-test/r/flush.result
diff options
context:
space:
mode:
authorKonstantin Osipov <kostja@sun.com>2010-08-13 18:14:36 +0400
committerKonstantin Osipov <kostja@sun.com>2010-08-13 18:14:36 +0400
commit5c7ac4aa7abcc41f09e226162e3c03faa6207c94 (patch)
tree787afc718416745126d8ca1a9db3a4734fb2ee14 /mysql-test/r/flush.result
parent8ce6e98aa335590d18dbb4f9d453ad4c67bd1a2b (diff)
downloadmariadb-git-5c7ac4aa7abcc41f09e226162e3c03faa6207c94.tar.gz
Bug#52117 "Pending FLUSH TALBES <list> aborts transactions unnecessarily"
The bug was fixed by the patch for Bug 52044. Add a test case. mysql-test/r/flush.result: Update results (Bug#52117) mysql-test/t/flush.test: Add a test case for Bug#52117 "Pending FLUSH TALBES <list> aborts transactions unnecessarily"
Diffstat (limited to 'mysql-test/r/flush.result')
-rw-r--r--mysql-test/r/flush.result69
1 files changed, 69 insertions, 0 deletions
diff --git a/mysql-test/r/flush.result b/mysql-test/r/flush.result
index f2b562db478..aee18d91edf 100644
--- a/mysql-test/r/flush.result
+++ b/mysql-test/r/flush.result
@@ -304,3 +304,72 @@ a
1
handler t1 close;
drop table t1;
+#
+# Bug#52117 Pending FLUSH TALBES <list> aborts
+# transactions unnecessarily.
+#
+drop table if exists t1;
+# --> conection default
+create table t1 (a int);
+begin;
+select * from t1;
+a
+# --> connection con1
+#
+# Issue a LOCK TABLE t1 READ. We could use HANDLER t1 OPEN
+# or a long-running select -- anything that
+# prevents FLUSH TABLE t1 from immediate completion would do.
+#
+lock table t1 read;
+# --> connection con2
+#
+# FLUSH TABLE expels the table definition from the cache.
+# Sending 'flush table t1'...
+flush table t1;
+# --> connection default
+# Let flush table sync in.
+select * from t1;
+# --> connection con1
+select * from t1;
+a
+unlock tables;
+# --> connection con2
+# Reaping 'flush table t1'...
+# --> connection default
+# Reaping 'select * from t1'...
+a
+commit;
+#
+# Repeat the same test but with FLUSH TABLES
+#
+begin;
+select * from t1;
+a
+# --> connection con1
+#
+# Issue a LOCK TABLE t1 READ.
+#
+lock table t1 read;
+# --> connection con2
+#
+# FLUSH TABLES expels the table definition from the cache.
+# Sending 'flush tables'...
+flush tables;
+# --> connection default
+# Let flush table sync in.
+select * from t1;
+# --> connection con1
+select * from t1;
+a
+unlock tables;
+# --> connection con2
+# Reaping 'flush tables'...
+# --> connection default
+# Reaping 'select * from t1'...
+a
+commit;
+# Cleanup
+# --> connection con1
+# --> connection con2
+# --> connection default
+drop table t1;