1--source include/not_embedded.inc 2# 3# MDEV-11552 Queries executed by event scheduler are written to slow log incorrectly or not written at all 4# 5set @event_scheduler_save= @@global.event_scheduler; 6set @slow_query_log_save= @@global.slow_query_log; 7 8set global event_scheduler= on; 9set global slow_query_log= on; 10set global long_query_time=0.2; 11 12create table t1 (i int); 13insert into t1 values (0); 14create event ev on schedule at CURRENT_TIMESTAMP + INTERVAL 1 second do update t1 set i=1+sleep(0.5); 15 16--let wait_condition= select i from t1 where i > 0 17--source include/wait_condition.inc 18 19--let SEARCH_FILE = `SELECT @@slow_query_log_file` 20--let SEARCH_PATTERN= update t1 set i=1 21--let SEARCH_RANGE= -1000 22--source include/search_pattern_in_file.inc 23 24drop table t1; 25 26set global event_scheduler= @event_scheduler_save; 27set global slow_query_log= @slow_query_log_save; 28set global long_query_time= @@session.long_query_time; 29