MDEV-33965 - fix non-determinism in the main.status test
Change the order or queries, so that result of "uptime_since_flush" comparison does not depend on timing. Also, improve the execution speed of the test by ca. 25 percent, removing or reducing the sleeps. There is no need to sleep more than 1 second in this test.
This commit is contained in:
parent
1c4aed7c68
commit
d54ec1b377
@ -481,7 +481,7 @@ flush session status;
|
||||
select $new_global_flush_status >= $global_flush_status as "1";
|
||||
1
|
||||
1
|
||||
select $new_local_flush_status < $global_flush_status as "1";
|
||||
select $new_local_flush_status < $new_global_flush_status as "1";
|
||||
1
|
||||
1
|
||||
flush global status;
|
||||
|
@ -480,23 +480,21 @@ connection default;
|
||||
flush global status;
|
||||
flush session status;
|
||||
|
||||
--sleep 1
|
||||
|
||||
let $global_flush_status= `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME LIKE 'Uptime_since_flush_status'`;
|
||||
let $local_flush_status= `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME LIKE 'Uptime_since_flush_status'`;
|
||||
let $global_flush_status= `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME LIKE 'Uptime_since_flush_status'`;
|
||||
|
||||
--sleep 2
|
||||
--sleep 1
|
||||
|
||||
--evalp select $global_flush_status >= $local_flush_status as "1"
|
||||
flush session status;
|
||||
|
||||
let $new_global_flush_status= `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME LIKE 'Uptime_since_flush_status'`;
|
||||
let $new_local_flush_status= `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME LIKE 'Uptime_since_flush_status'`;
|
||||
let $new_global_flush_status= `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME LIKE 'Uptime_since_flush_status'`;
|
||||
|
||||
--evalp select $new_global_flush_status >= $global_flush_status as "1"
|
||||
--evalp select $new_local_flush_status < $global_flush_status as "1"
|
||||
--evalp select $new_local_flush_status < $new_global_flush_status as "1"
|
||||
|
||||
--sleep 2
|
||||
--sleep 1
|
||||
flush global status;
|
||||
|
||||
let $local_flush_status=$new_local_flush_status;
|
||||
|
Loading…
x
Reference in New Issue
Block a user