summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2012-03-29 16:32:35 +0200
committerSergei Golubchik <sergii@pisem.net>2012-03-29 16:32:35 +0200
commit20c2cea4f49bf48efbc562849c0a425448e4d3a5 (patch)
tree2301d25b7425ba0a4268849ad855ca825ce48602
parent29ac38b734a4c6e8ba9356cde1d2912f326032a4 (diff)
downloadmariadb-git-20c2cea4f49bf48efbc562849c0a425448e4d3a5.tar.gz
remove race conditions from the test
-rw-r--r--mysql-test/suite/innodb/r/innodb-autoinc-61209.result12
-rw-r--r--mysql-test/suite/innodb/t/innodb-autoinc-61209.test10
2 files changed, 7 insertions, 15 deletions
diff --git a/mysql-test/suite/innodb/r/innodb-autoinc-61209.result b/mysql-test/suite/innodb/r/innodb-autoinc-61209.result
index 9c1e75c22e7..1ae672fcf98 100644
--- a/mysql-test/suite/innodb/r/innodb-autoinc-61209.result
+++ b/mysql-test/suite/innodb/r/innodb-autoinc-61209.result
@@ -9,7 +9,9 @@ INSERT INTO bug_61209 VALUES (), ();
# Connection con1
SET SESSION auto_increment_increment=3;
SET SESSION auto_increment_offset=2;
-SELECT GET_LOCK('a', 10);
+SELECT GET_LOCK('a', 9);
+GET_LOCK('a', 9)
+1
# Connection con2
SET SESSION auto_increment_increment=3;
@@ -17,16 +19,12 @@ SET SESSION auto_increment_offset=2;
INSERT INTO bug_61209 (a) VALUES (NULL), (NULL), (NULL + GET_LOCK('a', 10));
# Connection con1 reap
-GET_LOCK('a', 10)
-1
INSERT INTO bug_61209 (a) VALUES (NULL), (NULL), (NULL);
SELECT RELEASE_LOCK('a');
+RELEASE_LOCK('a')
+1
# Connection con2 reap
Warnings:
Warning 1265 Data truncated for column 'a' at row 3
-
-# Connection con1 reap
-RELEASE_LOCK('a')
-1
DROP TABLE bug_61209;
diff --git a/mysql-test/suite/innodb/t/innodb-autoinc-61209.test b/mysql-test/suite/innodb/t/innodb-autoinc-61209.test
index 12bdc236b90..cf0b7cf2415 100644
--- a/mysql-test/suite/innodb/t/innodb-autoinc-61209.test
+++ b/mysql-test/suite/innodb/t/innodb-autoinc-61209.test
@@ -29,7 +29,7 @@ INSERT INTO bug_61209 VALUES (), ();
--connection con1
SET SESSION auto_increment_increment=3;
SET SESSION auto_increment_offset=2;
-send SELECT GET_LOCK('a', 10);
+SELECT GET_LOCK('a', 9);
--echo
--echo # Connection con2
@@ -41,20 +41,14 @@ send INSERT INTO bug_61209 (a) VALUES (NULL), (NULL), (NULL + GET_LOCK('a', 10))
--echo
--echo # Connection con1 reap
--connection con1
-reap;
INSERT INTO bug_61209 (a) VALUES (NULL), (NULL), (NULL);
-send SELECT RELEASE_LOCK('a');
+SELECT RELEASE_LOCK('a');
--echo
--echo # Connection con2 reap
--connection con2
reap;
---echo
---echo # Connection con1 reap
---connection con1
-reap;
-
#
# Clean up
#