Commit f4d997b5 authored by John Esmet's avatar John Esmet

[t:3453] getting rid of sleep hack


git-svn-id: file:///svn/mysql/tests/mysql-test@35022 c7de825b-a66e-492c-adef-691d508d4ae1
parent bfc113c9
# 9/23/2011 Generate blocking row lock tests # 9/23/2011 Generate blocking row lock tests
import datetime import datetime
# whether or not to do a sleep hack to get
# tests to pass
do_sleep_hack = False
# generate sql write queries # generate sql write queries
def mysqlgen_select_for_update(k, kv, c, cv): def mysqlgen_select_for_update(k, kv, c, cv):
print "select * from t where %s=%s for update;" % (k, kv) print "select * from t where %s=%s for update;" % (k, kv)
...@@ -83,8 +79,6 @@ for timeout in ["0", "1000000"]: ...@@ -83,8 +79,6 @@ for timeout in ["0", "1000000"]:
for k in range(1, 5): for k in range(1, 5):
if k == 1: if k == 1:
print "--error ER_LOCK_WAIT_TIMEOUT" print "--error ER_LOCK_WAIT_TIMEOUT"
if do_sleep_hack:
print "--sleep 0.2"
qb("a", k, "b", "100") qb("a", k, "b", "100")
# Always check in the end that a commit # Always check in the end that a commit
# allows the other transaction full access # allows the other transaction full access
...@@ -104,12 +98,8 @@ for timeout in ["0", "1000000"]: ...@@ -104,12 +98,8 @@ for timeout in ["0", "1000000"]:
qa("a", "1", "b", "100") qa("a", "1", "b", "100")
print "connection conn2;" print "connection conn2;"
print "--error ER_LOCK_WAIT_TIMEOUT" print "--error ER_LOCK_WAIT_TIMEOUT"
if do_sleep_hack:
print "--sleep 0.2"
rq("a", "b", "<=2") rq("a", "b", "<=2")
print "--error ER_LOCK_WAIT_TIMEOUT" print "--error ER_LOCK_WAIT_TIMEOUT"
if do_sleep_hack:
print "--sleep 0.2"
rq("a", "b", ">=0") rq("a", "b", ">=0")
rq("a", "b", ">2") rq("a", "b", ">2")
# Always check in the end that a commit # Always check in the end that a commit
......
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