Commit 6a10468e authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-13255 main.status failed in buildbot

Test fails sporadically and very rarely on this:
```
let $org_queries= `SHOW STATUS LIKE 'Queries'`;
SELECT f1();
CALL p1();
let $new_queries= `SHOW STATUS LIKE 'Queries'`;
let $diff= `SELECT SUBSTRING('$new_queries',9)-SUBSTRING('$org_queries',9)`;
```
if COM_QUIT from one of the earlier (in the test) disconnect's
happens between the two SHOW STATUS commands.
Because COM_QUIT increments "Queries".

The directly previous test uses wait_condition to wait for
its disconnects to complete. But there are more disconnects earlier
in the test file and nothing waits for them.

Let's change wait_condition to wait for *all* disconnect to complete.
parent 1767390b
......@@ -280,7 +280,6 @@ show status like 'Com%function';
#
connect (root, localhost, root,,test);
connection root;
let $root_connection_id= `select connection_id()`;
--disable_warnings
create database db37908;
--enable_warnings
......@@ -296,7 +295,6 @@ delimiter ;|
connect (user1,localhost,mysqltest_1,,test);
connection user1;
let $user1_connection_id= `select connection_id()`;
--error ER_TABLEACCESS_DENIED_ERROR
select * from db37908.t1;
......@@ -315,11 +313,8 @@ drop procedure proc37908;
drop function func37908;
REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_1@localhost;
DROP USER mysqltest_1@localhost;
# Wait till the sessions user1 and root are disconnected
let $wait_condition =
SELECT COUNT(*) = 0
FROM information_schema.processlist
WHERE id in ('$root_connection_id','$user1_connection_id');
# Wait until all non-default sessions are disconnected
let $wait_condition = SELECT COUNT(*) = 1 FROM information_schema.processlist;
--source include/wait_condition.inc
#
......
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