Comment 1 for bug 1662909

Revision history for this message
Elena Stepanova (elenst) wrote :

We are getting the same failure, although rarely. If a machine or a build is very slow, the part where the test switched to the default connection, runs SELECT and COMMIT, and switches back, can take time, and since the default TokuDB lock timeout is only 4 seconds, the timeout occurs. Since the logic of the test is unrelated to the timeout, it makes sense just to set it to a higher value:

diff --git a/storage/tokudb/mysql-test/tokudb/r/locks-select-update-3.result b/storage/tokudb/mysql-test/tokudb/r/locks-select-update-3.result
index 8b31bf5..c1f05cd 100644
--- a/storage/tokudb/mysql-test/tokudb/r/locks-select-update-3.result
+++ b/storage/tokudb/mysql-test/tokudb/r/locks-select-update-3.result
@@ -8,6 +8,7 @@ select * from t where a=1 for update;
 a b
 1 0
 update t set b=b+1 where a=1;
+set session tokudb_lock_timeout= 60000;
 set session transaction isolation level read committed;
 begin;
 select * from t where a=1 for update;
diff --git a/storage/tokudb/mysql-test/tokudb/t/locks-select-update-3.test b/storage/tokudb/mysql-test/tokudb/t/locks-select-update-3.test
index a563f06..5b54fa7 100644
--- a/storage/tokudb/mysql-test/tokudb/t/locks-select-update-3.test
+++ b/storage/tokudb/mysql-test/tokudb/t/locks-select-update-3.test
@@ -15,6 +15,7 @@ select * from t where a=1 for update;
 # t2 update
 update t set b=b+1 where a=1;
 connect(conn1,localhost,root);
+set session tokudb_lock_timeout= 60000;
 set session transaction isolation level read committed;
 begin;
 # t2 select for update, should hang until t1 commits