1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-19 22:42:44 +03:00

[t:3453] getting rid of sleep hack

git-svn-id: file:///svn/mysql/tests/mysql-test@35022 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
John Esmet
2011-09-25 03:31:45 +00:00
parent bfc113c9f0
commit f4d997b51e

View File

@@ -1,10 +1,6 @@
# 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"]:
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"]:
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