Fix race in test of times shown in SHOW FULL PROCESSLIST.

(These are by their nature difficult to test reliably due to differences in timing).
This commit is contained in:
unknown 2009-09-29 22:19:43 +02:00
parent a84aa37830
commit d8aa3dbd34
2 changed files with 3 additions and 3 deletions

View file

@ -1385,7 +1385,7 @@ who
other connection here other connection here
SELECT IF(`time` > 0, 'OK', `time`) AS time_low, SELECT IF(`time` > 0, 'OK', `time`) AS time_low,
IF(`time` < 1000, 'OK', `time`) AS time_high, IF(`time` < 1000, 'OK', `time`) AS time_high,
IF(time_ms > 900, 'OK', time_ms) AS time_ms_low, IF(time_ms > 1500, 'OK', time_ms) AS time_ms_low,
IF(time_ms < 1000000, 'OK', time_ms) AS time_ms_high IF(time_ms < 1000000, 'OK', time_ms) AS time_ms_high
FROM INFORMATION_SCHEMA.PROCESSLIST FROM INFORMATION_SCHEMA.PROCESSLIST
WHERE ID=@tid; WHERE ID=@tid;

View file

@ -1105,13 +1105,13 @@ connect (pslistcon,localhost,root,,test);
let $ID= `select connection_id()`; let $ID= `select connection_id()`;
SELECT 'other connection here' AS who; SELECT 'other connection here' AS who;
connection default; connection default;
sleep 1; sleep 2;
--disable_query_log --disable_query_log
eval SET @tid=$ID; eval SET @tid=$ID;
--enable_query_log --enable_query_log
SELECT IF(`time` > 0, 'OK', `time`) AS time_low, SELECT IF(`time` > 0, 'OK', `time`) AS time_low,
IF(`time` < 1000, 'OK', `time`) AS time_high, IF(`time` < 1000, 'OK', `time`) AS time_high,
IF(time_ms > 900, 'OK', time_ms) AS time_ms_low, IF(time_ms > 1500, 'OK', time_ms) AS time_ms_low,
IF(time_ms < 1000000, 'OK', time_ms) AS time_ms_high IF(time_ms < 1000000, 'OK', time_ms) AS time_ms_high
FROM INFORMATION_SCHEMA.PROCESSLIST FROM INFORMATION_SCHEMA.PROCESSLIST
WHERE ID=@tid; WHERE ID=@tid;