Commit ac6aa402 authored by Sergei Golubchik's avatar Sergei Golubchik

remove race conditions from the test

parent 3bdd6646
...@@ -9,7 +9,9 @@ INSERT INTO bug_61209 VALUES (), (); ...@@ -9,7 +9,9 @@ INSERT INTO bug_61209 VALUES (), ();
# Connection con1 # Connection con1
SET SESSION auto_increment_increment=3; SET SESSION auto_increment_increment=3;
SET SESSION auto_increment_offset=2; SET SESSION auto_increment_offset=2;
SELECT GET_LOCK('a', 10); SELECT GET_LOCK('a', 9);
GET_LOCK('a', 9)
1
# Connection con2 # Connection con2
SET SESSION auto_increment_increment=3; SET SESSION auto_increment_increment=3;
...@@ -17,16 +19,12 @@ SET SESSION auto_increment_offset=2; ...@@ -17,16 +19,12 @@ SET SESSION auto_increment_offset=2;
INSERT INTO bug_61209 (a) VALUES (NULL), (NULL), (NULL + GET_LOCK('a', 10)); INSERT INTO bug_61209 (a) VALUES (NULL), (NULL), (NULL + GET_LOCK('a', 10));
# Connection con1 reap # Connection con1 reap
GET_LOCK('a', 10)
1
INSERT INTO bug_61209 (a) VALUES (NULL), (NULL), (NULL); INSERT INTO bug_61209 (a) VALUES (NULL), (NULL), (NULL);
SELECT RELEASE_LOCK('a'); SELECT RELEASE_LOCK('a');
RELEASE_LOCK('a')
1
# Connection con2 reap # Connection con2 reap
Warnings: Warnings:
Warning 1265 Data truncated for column 'a' at row 3 Warning 1265 Data truncated for column 'a' at row 3
# Connection con1 reap
RELEASE_LOCK('a')
1
DROP TABLE bug_61209; DROP TABLE bug_61209;
...@@ -29,7 +29,7 @@ INSERT INTO bug_61209 VALUES (), (); ...@@ -29,7 +29,7 @@ INSERT INTO bug_61209 VALUES (), ();
--connection con1 --connection con1
SET SESSION auto_increment_increment=3; SET SESSION auto_increment_increment=3;
SET SESSION auto_increment_offset=2; SET SESSION auto_increment_offset=2;
send SELECT GET_LOCK('a', 10); SELECT GET_LOCK('a', 9);
--echo --echo
--echo # Connection con2 --echo # Connection con2
...@@ -41,20 +41,14 @@ send INSERT INTO bug_61209 (a) VALUES (NULL), (NULL), (NULL + GET_LOCK('a', 10)) ...@@ -41,20 +41,14 @@ send INSERT INTO bug_61209 (a) VALUES (NULL), (NULL), (NULL + GET_LOCK('a', 10))
--echo --echo
--echo # Connection con1 reap --echo # Connection con1 reap
--connection con1 --connection con1
reap;
INSERT INTO bug_61209 (a) VALUES (NULL), (NULL), (NULL); INSERT INTO bug_61209 (a) VALUES (NULL), (NULL), (NULL);
send SELECT RELEASE_LOCK('a'); SELECT RELEASE_LOCK('a');
--echo --echo
--echo # Connection con2 reap --echo # Connection con2 reap
--connection con2 --connection con2
reap; reap;
--echo
--echo # Connection con1 reap
--connection con1
reap;
# #
# Clean up # Clean up
# #
......
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