summaryrefslogtreecommitdiff
path: root/mysql-test/include
diff options
context:
space:
mode:
authortsmith/tim@siva.hindu.god <>2006-12-19 16:57:51 -0700
committertsmith/tim@siva.hindu.god <>2006-12-19 16:57:51 -0700
commit0d5dc51438463226da454808a4ef370d194ae65d (patch)
tree9d22a6e3d1f813ebfd932d958ebe02a7a5519099 /mysql-test/include
parent3cc1a4251aac06024f9f2346bbb411d90f7c4aa8 (diff)
downloadmariadb-git-0d5dc51438463226da454808a4ef370d194ae65d.tar.gz
Added innodb_rollback_on_timeout option to restore the 4.1
InnoDB timeout behavior (Bug #24200)
Diffstat (limited to 'mysql-test/include')
-rw-r--r--mysql-test/include/innodb_rollback_on_timeout.inc37
1 files changed, 37 insertions, 0 deletions
diff --git a/mysql-test/include/innodb_rollback_on_timeout.inc b/mysql-test/include/innodb_rollback_on_timeout.inc
new file mode 100644
index 00000000000..73c7374c79e
--- /dev/null
+++ b/mysql-test/include/innodb_rollback_on_timeout.inc
@@ -0,0 +1,37 @@
+#
+# Bug #24200: Provide backwards compatibility mode for 4.x "rollback on
+# transaction timeout"
+#
+show variables like 'innodb_rollback_on_timeout';
+create table t1 (a int unsigned not null primary key) engine = innodb;
+insert into t1 values (1);
+commit;
+connect (con1,localhost,root,,);
+connect (con2,localhost,root,,);
+
+connection con2;
+begin work;
+insert into t1 values (2);
+select * from t1;
+
+connection con1;
+begin work;
+insert into t1 values (5);
+select * from t1;
+# Lock wait timeout set to 2 seconds in <THIS TEST>-master.opt; this
+# statement will time out; in 5.0.13+, it will not roll back transaction.
+--error ER_LOCK_WAIT_TIMEOUT
+insert into t1 values (2);
+# On 5.0.13+, this should give ==> 1, 5
+select * from t1;
+commit;
+
+connection con2;
+select * from t1;
+commit;
+
+connection default;
+select * from t1;
+drop table t1;
+disconnect con1;
+disconnect con2;