mariadb/mysql-test/r/events_slowlog.result
Sergei Golubchik b2865a437f search_pattern_in_file.inc changes
1. Special mode to search in error logs: if SEARCH_RANGE is not set,
   the file is considered an error log and the search is performed
   since the last CURRENT_TEST: line
2. Number of matches is printed too. "FOUND 5 /foo/ in bar".
   Use greedy .* at the end of the pattern if number of matches
   isn't stable. If nothing is found it's still "NOT FOUND",
   not "FOUND 0".
3. SEARCH_ABORT specifies the prefix of the output.
   Can be "NOT FOUND" or "FOUND" as before,
   but also "FOUND 5 " if needed.
2017-03-31 19:28:58 +02:00

13 lines
570 B
Text

set @event_scheduler_save= @@global.event_scheduler;
set @slow_query_log_save= @@global.slow_query_log;
set global event_scheduler= on;
set global slow_query_log= on;
set global long_query_time=0.2;
create table t1 (i int);
insert into t1 values (0);
create event ev on schedule at CURRENT_TIMESTAMP + INTERVAL 1 second do update t1 set i=1+sleep(0.5);
FOUND 1 /update t1 set i=1/ in mysqld-slow.log
drop table t1;
set global event_scheduler= @event_scheduler_save;
set global slow_query_log= @slow_query_log_save;
set global long_query_time= @@session.long_query_time;