mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
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
This commit is contained in:
@@ -499,6 +499,9 @@ set global event_scheduler=off;
|
||||
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;
|
||||
user host db command state info
|
||||
root localhost events_test Connect User lock select get_lock("test_lock2_1", 20)
|
||||
select release_lock("test_lock2_1");
|
||||
release_lock("test_lock2_1")
|
||||
1
|
||||
drop event закачка21;
|
||||
create table t_16 (s1 int);
|
||||
create trigger t_16_bi before insert on t_16 for each row create event e_16 on schedule every 1 second do set @a=5;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user