WL#1034
mysql-test/t/events_logs_tests-master.opt:
Rename: mysql-test/t/events_slow_query-master.opt -> mysql-test/t/events_logs_tests-master.opt
sql/event_timed.cc:
ask the anonymous SP to log general statements
sql/sp_head.cc:
save the OPTION_LOG_OFF and restore it after execution
sql/sp_head.h:
add a new flag for general log
mysql-test/r/events_logs_tests.result:
update result file
mysql-test/t/events_logs_tests.test:
add test for general log
mysql-test/r/events_slow_query.result:
fix result
mysql-test/t/events_slow_query.test:
create different event because the executor is buggy and won't catch the difference if
the memory address does not change (will be reported as bug separately)
sql/sp_head.cc:
this was an error which passed code review. thd->enable_slow_log could be
changed and it should not be relied
Events: Event-caused statements don't appear in the slow query log
WL#1034
sql/event_executor.cc:
enable slow logging
sql/event_timed.cc:
enable slow logging for the anonymous SP
sql/sp_head.cc:
allow thd->enable_slow_log to be TRUE if only
m_flags & sp_head::LOG_SLOW_STATEMENTS
Because usually enable_slow_log is 1 in user mode, this second
check is needed backup the mode otherwise.
sql/sp_head.h:
add a new constant for slow queries. SP by default does not log slow queries in the
body just the whole CALL could be considered as slow if taking too much time and
called directly from the user
sql/sql_parse.cc:
let us see in the the trace log