summaryrefslogtreecommitdiff
path: root/mysql-test/r/events_logs_tests.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/r/events_logs_tests.result')
-rw-r--r--mysql-test/r/events_logs_tests.result25
1 files changed, 14 insertions, 11 deletions
diff --git a/mysql-test/r/events_logs_tests.result b/mysql-test/r/events_logs_tests.result
index f56ebe3e472..5971dead3c8 100644
--- a/mysql-test/r/events_logs_tests.result
+++ b/mysql-test/r/events_logs_tests.result
@@ -1,5 +1,5 @@
-create database if not exists events_test;
-use events_test;
+CREATE DATABASE IF NOT EXISTS events_test;
+USE events_test;
"We use procedure here because its statements won't be logged into the general log"
"If we had used normal select that are logged in different ways depending on whether"
"the test suite is run in normal mode or with --ps-protocol"
@@ -8,18 +8,21 @@ BEGIN
SELECT user_host, argument FROM mysql.general_log WHERE argument LIKE '%alabala%';
END|
"Check General Query Log"
-SET GLOBAL event_scheduler=2;
-create event log_general on schedule every 1 minute do SELect 'alabala', sleep(1) from dual;
-TRUNCATE mysql.general_log;
-"1 row, the current statement!"
-call select_general_log();
+CALL select_general_log();
user_host argument
+USER_HOST CREATE procedure select_general_log()
+BEGIN
+SELECT user_host, argument FROM mysql.general_log WHERE argument LIKE '%alabala%';
+END
SET GLOBAL event_scheduler=1;
+TRUNCATE mysql.general_log;
+CREATE EVENT log_general ON SCHEDULE EVERY 1 MINUTE DO SELECT 'alabala', SLEEP(1) FROM DUAL;
"Wait the scheduler to start"
-"Should see 3 rows - the 'SELect' is in the middle. The other two are selects from general_log"
-call select_general_log();
+"Should see 2 rows - the 'SELECT' is in the middle. The other two are selects from general_log"
+CALL select_general_log();
user_host argument
-USER_HOST SELect 'alabala', sleep(1) from dual
+USER_HOST CREATE EVENT log_general ON SCHEDULE EVERY 1 MINUTE DO SELECT 'alabala', SLEEP(1) FROM DUAL
+USER_HOST SELECT 'alabala', SLEEP(1) FROM DUAL
DROP PROCEDURE select_general_log;
DROP EVENT log_general;
SET GLOBAL event_scheduler=2;
@@ -90,4 +93,4 @@ TRUNCATE mysql.slow_log;
DROP TABLE slow_event_test;
SET GLOBAL long_query_time =@old_global_long_query_time;
SET SESSION long_query_time =@old_session_long_query_time;
-drop database events_test;
+DROP DATABASE events_test;