From b27a09561f4c59dec56c9929d73e0cd03df3760b Mon Sep 17 00:00:00 2001 From: Kristian Nielsen Date: Tue, 21 Oct 2014 15:23:40 +0200 Subject: [PATCH] Attempt to fix a rare random test error in main.information_schema. Add missing REAP to the test. A later test failed with strange incorrect values for COM_SELECT in information_schema.global_status. Since global_status is updated at the end of session activity, it seems appropriate to ensure that all background connections have completed before accessing it. (I checked that the original bug still triggers the test case after the modification with REAP). --- mysql-test/r/information_schema.result | 2 ++ mysql-test/t/information_schema.test | 12 ++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result index 93fc70caa2c..729b9e94e7e 100644 --- a/mysql-test/r/information_schema.result +++ b/mysql-test/r/information_schema.result @@ -1554,7 +1554,9 @@ show open tables where f1()=0; drop table t1; drop function f1; select * from information_schema.tables where 1=sleep(100000); +Got one of the listed errors select * from information_schema.columns where 1=sleep(100000); +Got one of the listed errors explain select count(*) from information_schema.tables; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE tables ALL NULL NULL NULL NULL NULL Skip_open_table; Scanned all databases diff --git a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test index 8c88be5c603..80ba4a91542 100644 --- a/mysql-test/t/information_schema.test +++ b/mysql-test/t/information_schema.test @@ -1298,12 +1298,16 @@ info='select * from information_schema.tables where 1=sleep(100000)'; disable_query_log; eval kill $ID; enable_query_log; -disconnect conn1; let $wait_timeout= 10; let $wait_condition=select count(*)=0 from information_schema.processlist where state='User sleep' and info='select * from information_schema.tables where 1=sleep(100000)'; --source include/wait_condition.inc +connection conn1; +--error 2013,ER_CONNECTION_KILLED +reap; +connection default; +disconnect conn1; connect (conn1, localhost, root,,); connection conn1; @@ -1318,12 +1322,16 @@ info='select * from information_schema.columns where 1=sleep(100000)'; disable_query_log; eval kill $ID; enable_query_log; -disconnect conn1; let $wait_timeout= 10; let $wait_condition=select count(*)=0 from information_schema.processlist where state='User sleep' and info='select * from information_schema.columns where 1=sleep(100000)'; --source include/wait_condition.inc +connection conn1; +--error 2013,ER_CONNECTION_KILLED +reap; +connection default; +disconnect conn1; #