diff options
author | unknown <andrey@lmy004.> | 2006-03-02 23:40:51 +0100 |
---|---|---|
committer | unknown <andrey@lmy004.> | 2006-03-02 23:40:51 +0100 |
commit | 104b9e789a60c8881e6e82cbbf7b8d919ff1bbf1 (patch) | |
tree | 7678d762f81c175b36985065e13ff1c012f42460 /mysql-test/t/events_logs_tests.test | |
parent | 8d7f44388bbd1d5197447c578979d31f0253f32d (diff) | |
download | mariadb-git-104b9e789a60c8881e6e82cbbf7b8d919ff1bbf1.tar.gz |
update test
mysql-test/r/events_logs_tests.result:
update result
Diffstat (limited to 'mysql-test/t/events_logs_tests.test')
-rw-r--r-- | mysql-test/t/events_logs_tests.test | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/mysql-test/t/events_logs_tests.test b/mysql-test/t/events_logs_tests.test index 6b733fa989f..e586184c9e4 100644 --- a/mysql-test/t/events_logs_tests.test +++ b/mysql-test/t/events_logs_tests.test @@ -1,16 +1,26 @@ create database if not exists events_test; use events_test; - +--echo "We use procedure here because its statements won't be logged into the general log" +--echo "If we had used normal select that are logged in different ways depending on whether" +--echo "the test suite is run in normal mode or with --ps-protocol" +delimiter |; +CREATE procedure select_general_log() +BEGIN + SELECT user_host, argument FROM mysql.general_log WHERE argument LIKE '%alabala%'; +END| +delimiter ;| --echo "Check General Query Log" SET GLOBAL event_scheduler=0; -create event log_general on schedule every 1 minute do seLect 'alabala', sleep(3) from dual; +create event log_general on schedule every 1 minute do SELect 'alabala', sleep(3) from dual; TRUNCATE mysql.general_log; -SELECT user_host, command_type, argument FROM mysql.general_log; +--echo "1 row, the current statement!" +call select_general_log(); SET GLOBAL event_scheduler=1; --echo "Wait the scheduler to start" ---echo "Should see 3 rows. The create, the seLect and the select from the general_log" +--echo "Should see 3 rows - the 'SELect' is in the middle. The other two are selects from general_log" --sleep 2 -SELECT user_host, command_type, argument FROM mysql.general_log; +call select_general_log(); +DROP PROCEDURE select_general_log; DROP EVENT log_general; SET GLOBAL event_scheduler=0; --sleep 1 |