Commit 53e8d828 authored by Rich Prohaska's avatar Rich Prohaska

#128 fix some tokudb_lock_timeout tests that broke when we changed to a session variable

parent e8c0540f
......@@ -44,7 +44,6 @@ def mysqlgen_reload_table():
def mysqlgen_cleanup():
print "# clean it all up"
print "drop table t;"
print "set global tokudb_lock_timeout=4000;"
print ""
write_point_queries = [
("select for update", mysqlgen_select_for_update),
......@@ -65,7 +64,10 @@ mysqlgen_prepare()
mysqlgen_reload_table()
for timeout in timeouts:
print "# testing with timeout %s" % timeout
print "set global tokudb_lock_timeout=%s;" % timeout
print "connection conn1;"
print "set session tokudb_lock_timeout=%s;" % timeout
print "connection conn2;"
print "set session tokudb_lock_timeout=%s;" % timeout
print ""
print "# testing each point query vs each point query"
for ta, qa in write_point_queries:
......
select @@tokudb_lock_timeout;
@@tokudb_lock_timeout
4000
set global tokudb_lock_timeout=1234567;
set session tokudb_lock_timeout=1234567;
select @@tokudb_lock_timeout;
@@tokudb_lock_timeout
1234567
set global tokudb_lock_timeout=0;
set session tokudb_lock_timeout=0;
select @@tokudb_lock_timeout;
@@tokudb_lock_timeout
0
set global tokudb_lock_timeout=5000000;
set session tokudb_lock_timeout=5000000;
select @@tokudb_lock_timeout;
@@tokudb_lock_timeout
5000000
set global tokudb_lock_timeout=1000000;
set session tokudb_lock_timeout=1000000;
select @@tokudb_lock_timeout;
@@tokudb_lock_timeout
1000000
set global tokudb_lock_timeout=4000;
set session tokudb_lock_timeout=4000;
select @@tokudb_lock_timeout;
@@tokudb_lock_timeout
4000
......@@ -8,7 +8,8 @@ insert ignore t values(3, 9);
insert ignore t values(4, 16);
insert ignore t values(5, 25);
insert ignore t values(6, 36);
set global tokudb_lock_timeout=0;
set session tokudb_lock_timeout=0;
set session tokudb_lock_timeout=0;
begin;
select * from t where a=1 for update;
a b
......@@ -1067,7 +1068,8 @@ a b
5 25
6 36
commit;
set global tokudb_lock_timeout=500;
set session tokudb_lock_timeout=500;
set session tokudb_lock_timeout=500;
begin;
select * from t where a=1 for update;
a b
......@@ -2287,4 +2289,3 @@ update t set b=b where a>=2 and a<=4;
update t set b=b where a>=0 and a<=3;
commit;
drop table t;
set global tokudb_lock_timeout=4000;
......@@ -2,15 +2,15 @@
# Test that getting and setting the value for
# blocking row lock timeout works correctly.
# Make sure we can read/write the global lock timeout system variable
# Make sure we can read/write the session lock timeout system variable
select @@tokudb_lock_timeout;
set global tokudb_lock_timeout=1234567;
set session tokudb_lock_timeout=1234567;
select @@tokudb_lock_timeout;
set global tokudb_lock_timeout=0;
set session tokudb_lock_timeout=0;
select @@tokudb_lock_timeout;
set global tokudb_lock_timeout=5000000;
set session tokudb_lock_timeout=5000000;
select @@tokudb_lock_timeout;
set global tokudb_lock_timeout=1000000;
set session tokudb_lock_timeout=1000000;
select @@tokudb_lock_timeout;
set global tokudb_lock_timeout=4000;
set session tokudb_lock_timeout=4000;
select @@tokudb_lock_timeout;
# Tokutek
# Blocking row lock tests;
# Generated by blocking-row-locks-testgen.py on 2011-11-11;
# Generated by locks-blocking-row-locks-testgen.py on 2013-10-14;
# prepare with some common parameters
connect(conn1, localhost, root);
......@@ -22,7 +22,10 @@ insert ignore t values(5, 25);
insert ignore t values(6, 36);
# testing with timeout 0
set global tokudb_lock_timeout=0;
connection conn1;
set session tokudb_lock_timeout=0;
connection conn2;
set session tokudb_lock_timeout=0;
# testing each point query vs each point query
# testing conflict "select for update" vs. "select for update"
......@@ -842,7 +845,10 @@ commit;
connection conn1;
# testing with timeout 500
set global tokudb_lock_timeout=500;
connection conn1;
set session tokudb_lock_timeout=500;
connection conn2;
set session tokudb_lock_timeout=500;
# testing each point query vs each point query
# testing conflict "select for update" vs. "select for update"
......@@ -1971,5 +1977,4 @@ connection conn2;
reap;
# clean it all up
drop table t;
set global tokudb_lock_timeout=4000;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment