diff options
author | unknown <thek@adventure.(none)> | 2007-08-23 15:37:55 +0200 |
---|---|---|
committer | unknown <thek@adventure.(none)> | 2007-08-23 15:37:55 +0200 |
commit | 55d65833cabf91bd62d8065840a2eadc1c784ded (patch) | |
tree | f0beb405dec9be793d8441d69624bafb2bd944e6 /mysql-test/t/events.test | |
parent | 7dd4e789586bef5141e1a1d4da4b7efc271708aa (diff) | |
download | mariadb-git-55d65833cabf91bd62d8065840a2eadc1c784ded.tar.gz |
Bug#28285 Test "events_bugs" has instable results of "select /*1*/ ... from processlist"
Test case contains possible race conditions. This patch fixes these race
conditions and also adjust the test to execute according to its documentation.
mysql-test/r/events.result:
Modified test case to fit test documentation
mysql-test/t/events.test:
Modified test case to fit test documentation
Diffstat (limited to 'mysql-test/t/events.test')
-rw-r--r-- | mysql-test/t/events.test | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/mysql-test/t/events.test b/mysql-test/t/events.test index d7232705b81..cbb36cbd2be 100644 --- a/mysql-test/t/events.test +++ b/mysql-test/t/events.test @@ -466,13 +466,17 @@ drop event закачка; set global event_scheduler=1; select get_lock("test_lock2_1", 20); create event закачка21 on schedule every 10 hour do select get_lock("test_lock2_1", 20); ---sleep 1 +let $wait_condition= select count(*) = 3 from information_schema.processlist; +--source include/wait_condition.inc --echo "Should have only 3 processes: the scheduler, our conn and the locked event" select /*3*/ user, host, db, command, state, info from information_schema.processlist where (command!='Daemon' || user='event_scheduler') and (info is null or info not like '%processlist%') order by info; set global event_scheduler=off; ---sleep 0.8 +let $wait_condition= select count(*) =1 from information_schema.processlist + where (command!='Daemon' || user='event_scheduler') and (info is null or info not like '%processlist%') order by info; +--source include/wait_condition.inc --echo "Should have only our process now:" select /*4*/ user, host, db, command, state, info from information_schema.processlist where (command!='Daemon' || user='event_scheduler') and (info is null or info not like '%processlist%') order by info; +select release_lock("test_lock2_1"); drop event закачка21; let $wait_condition= select count(*) = 0 from information_schema.processlist |