summaryrefslogtreecommitdiff
path: root/mysql-test/t/events_logs_tests.test
diff options
context:
space:
mode:
authorunknown <andrey@lmy004.>2006-07-11 18:28:15 +0200
committerunknown <andrey@lmy004.>2006-07-11 18:28:15 +0200
commit42a8e2c9421854710679a0f6c3ceef6c0777ded4 (patch)
treef2fc5508efd161a1ef60e481f22fe90017197fa1 /mysql-test/t/events_logs_tests.test
parent084f74426b5f19b47984ef298309e9a4015940c3 (diff)
downloadmariadb-git-42a8e2c9421854710679a0f6c3ceef6c0777ded4.tar.gz
WL#3337 (Event scheduler new architecture)
More small fixes to the API : use LEX_STRING instead of LEX_STRING* and if error then return bool(true) instead of error code. Merged functions. Reduced usage of sp_name. Fixed a lot of function documentation errors. Added function documentation wherever needed. Removed some unused defines and error codes. Next to come is batch rename of Event_scheduler_ng to Event_scheduler. mysql-test/r/events.result: update result mysql-test/r/events_logs_tests.result: update result mysql-test/t/events.test: more test coverage mysql-test/t/events_logs_tests.test: fix test sql/event_data_objects.cc: Cosmetics. Fix function documentation whenever needed. Move Event_job_data::compile() next to Event_job_data::execute() sql/event_data_objects.h: Remove unneeded error codes and defines Move function declarations at the end of the header sql/event_db_repository.cc: Fix function documentation. Event_db_repository::update_event() now uses LEX_STRING *-s instead of sp_name . Lower coupling. sql/event_db_repository.h: Event_db_repository::update_event() now uses LEX_STRING *-s instead of sp_name . Lower coupling. find_event -> find_named_event find_event_by_name is not used externally, merge with load_named_event() sql/event_queue.cc: LEX_STRING* to LEX_STRING Fix comments. Fix and add function documentation. Remove Event_queue::events_count() as it is unused Change get_top_for_execution_if_time() to return status code as return value and the object is in out parameter. sql/event_queue.h: LEX_STRING* to LEX_STRING Fix comments. Fix and add function documentation. Remove Event_queue::events_count() as it is unused Change get_top_for_execution_if_time() to return status code as return value and the object is in out parameter. Try to detect also lock attemptions for deadlocks. sql/event_scheduler_ng.cc: Always execute on thd->mem_root Fix according to changed API of Event_queue::get_top_for_execution_if_time() sql/events.cc: Fix function documentation. Fix code after API changes of internal Event module classes. sql/events.h: sp_name -> LEX_STRINGs sql/sql_parse.cc: Fix according to changed API of Events::show_create_event() sql/sql_yacc.yy: Don't pass NULL as third parameter to sp_head::init_strings()
Diffstat (limited to 'mysql-test/t/events_logs_tests.test')
-rw-r--r--mysql-test/t/events_logs_tests.test20
1 files changed, 9 insertions, 11 deletions
diff --git a/mysql-test/t/events_logs_tests.test b/mysql-test/t/events_logs_tests.test
index 28818083efa..62c2aedf6cc 100644
--- a/mysql-test/t/events_logs_tests.test
+++ b/mysql-test/t/events_logs_tests.test
@@ -1,8 +1,8 @@
# Can't test with embedded server that doesn't support grants
-- source include/not_embedded.inc
-create database if not exists events_test;
-use events_test;
+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"
@@ -13,18 +13,16 @@ BEGIN
END|
delimiter ;|
--echo "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;
---echo "1 row, the current statement!"
--replace_column 1 USER_HOST
-call select_general_log();
+CALL select_general_log();
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;
--echo "Wait the scheduler to start"
---echo "Should see 3 rows - the 'SELect' is in the middle. The other two are selects from general_log"
---sleep 0.7
+--sleep 1.5
+--echo "Should see 2 rows - the 'SELECT' is in the middle. The other two are selects from general_log"
--replace_column 1 USER_HOST
-call select_general_log();
+CALL select_general_log();
DROP PROCEDURE select_general_log;
DROP EVENT log_general;
SET GLOBAL event_scheduler=2;
@@ -102,4 +100,4 @@ 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;