diff options
author | Kristofer Pettersson <kristofer.pettersson@sun.com> | 2008-10-31 10:25:03 +0100 |
---|---|---|
committer | Kristofer Pettersson <kristofer.pettersson@sun.com> | 2008-10-31 10:25:03 +0100 |
commit | 4729dce0edbeb8305053f987a40c21d7fb5b4770 (patch) | |
tree | ae544a0251ac648359889d4b3ed2da2d97203440 | |
parent | dd02d45c20e81ec306b5f8c77f5ce0cacd671fe8 (diff) | |
download | mariadb-git-4729dce0edbeb8305053f987a40c21d7fb5b4770.tar.gz |
Fixed race condition in test case status2. A 'disconnect' issues an
implicit command which isn't completed immediately.
mysql-test/r/status2.result:
* Moved disconnect command to avoid race.
mysql-test/t/status2.test:
* Moved disconnect command to avoid race.
-rw-r--r-- | mysql-test/r/status2.result | 8 | ||||
-rw-r--r-- | mysql-test/t/status2.test | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/mysql-test/r/status2.result b/mysql-test/r/status2.result index 7f6eab693e5..7e895381a44 100644 --- a/mysql-test/r/status2.result +++ b/mysql-test/r/status2.result @@ -53,11 +53,11 @@ Assert Questions == 16 SHOW STATUS LIKE 'Questions'; Variable_name Value Questions 16 -Global status updated; Assert diff == 5 +Global status updated; Assert diff == 4 FLUSH STATUS; -SELECT 5; -5 -5 +SELECT 4; +4 +4 DROP TABLE t1,t2; DROP PROCEDURE p1; DROP FUNCTION f1; diff --git a/mysql-test/t/status2.test b/mysql-test/t/status2.test index b834cd0c6ad..058a2fa1d25 100644 --- a/mysql-test/t/status2.test +++ b/mysql-test/t/status2.test @@ -47,16 +47,16 @@ FLUSH STATUS; let $org_questions= `SHOW GLOBAL STATUS LIKE 'questions'`; SELECT 1; connection default; -disconnect con1; --echo Assert Questions == 16 SHOW STATUS LIKE 'Questions'; ---echo Global status updated; Assert diff == 5 +--echo Global status updated; Assert diff == 4 FLUSH STATUS; let $new_questions= `SHOW GLOBAL STATUS LIKE 'questions'`; --disable_log let $diff= `SELECT SUBSTRING('$new_questions',10)-SUBSTRING('$org_questions',10)`; --enable_log eval SELECT $diff; +disconnect con1; DROP TABLE t1,t2; DROP PROCEDURE p1; DROP FUNCTION f1; |