summaryrefslogtreecommitdiff
path: root/mysql-test/r/events.result
diff options
context:
space:
mode:
authorunknown <andrey@lmy004.>2006-01-11 18:09:05 +0100
committerunknown <andrey@lmy004.>2006-01-11 18:09:05 +0100
commit2fc956fae97a7a5c1bad9f58af3e6fe19239a141 (patch)
treeb0cac7121379f8e07be12ac88fb9b00c04c75be0 /mysql-test/r/events.result
parent8d1ea9e259cfc8d9edb0b84a9d7f693e62f91120 (diff)
downloadmariadb-git-2fc956fae97a7a5c1bad9f58af3e6fe19239a141.tar.gz
WL #1034 (Internal CRON) pre-push updates
- various fixes of test cases (hopefully the last pre-push update before the push) mysql-test/include/system_db_struct.inc: extend test case to include testing for event system table mysql-test/r/events.result: results of events test mysql-test/r/system_mysql_db.result: more testing - add structure of event system table mysql-test/t/events.test: test case for events (internal CRON) mysql-test/t/system_mysql_db_fix.test: drop event table and leave the test database empty scripts/mysql_create_system_tables.sh: add missing create table statement scripts/mysql_fix_privilege_tables.sql: don't specify the database. this fixes a failing test case which creates the tables not on mysql but on a test database and then tests again mysql. sql/event_executor.cc: if asked to stop -> stop.
Diffstat (limited to 'mysql-test/r/events.result')
-rw-r--r--mysql-test/r/events.result105
1 files changed, 104 insertions, 1 deletions
diff --git a/mysql-test/r/events.result b/mysql-test/r/events.result
index d8aee068c5e..dcfd80dbcd1 100644
--- a/mysql-test/r/events.result
+++ b/mysql-test/r/events.result
@@ -1,4 +1,5 @@
-use test;
+create database if not exists events_test;
+use events_test;
drop event if exists event1;
Warnings:
Note 1305 Event event1 does not exist
@@ -19,3 +20,105 @@ count(*)
0
drop event event3;
drop table t_event3;
+set names utf8;
+create event задачка on schedule every 123 minute starts now() ends now() + interval 1 month do select 1;
+drop event задачка;
+set event_scheduler=0;
+ERROR HY000: Variable 'event_scheduler' is a GLOBAL variable and should be set with SET GLOBAL
+set global event_scheduler=2;
+ERROR 42000: Variable 'event_scheduler' can't be set to the value of '2'
+set global event_scheduler=0;
+select count(*) from mysql.event;
+count(*)
+0
+select get_lock("test_lock1", 20);
+get_lock("test_lock1", 20)
+1
+create event закачка on schedule every 10 hour do select get_lock("test_lock1", 20);
+select count(*) from mysql.event;
+count(*)
+1
+show processlist;
+Id User Host db Command Time State Info
+1 root localhost events_test Query 0 NULL show processlist
+select release_lock("test_lock1");
+release_lock("test_lock1")
+1
+drop event закачка;
+select count(*) from mysql.event;
+count(*)
+0
+set global event_scheduler=1;
+select get_lock("test_lock2", 20);
+get_lock("test_lock2", 20)
+1
+create event закачка on schedule every 10 hour do select get_lock("test_lock2", 20);
+select sleep(2);
+sleep(2)
+0
+show processlist;
+Id User Host db Command Time State Info
+1 root localhost events_test Query 0 NULL show processlist
+2 event_scheduler NULL Connect 1 Sleeping NULL
+3 root events_test Connect 1 User lock select get_lock("test_lock2", 20)
+select release_lock("test_lock2");
+release_lock("test_lock2")
+1
+drop event закачка;
+set global event_scheduler=1;
+select get_lock("test_lock2_1", 20);
+get_lock("test_lock2_1", 20)
+1
+create event закачка21 on schedule every 10 hour do select get_lock("test_lock2_1", 20);
+select sleep(2);
+sleep(2)
+0
+show processlist;
+Id User Host db Command Time State Info
+1 root localhost events_test Query 0 NULL show processlist
+2 event_scheduler NULL Connect 1 Sleeping NULL
+4 root events_test Connect 1 User lock select get_lock("test_lock2_1", 20)
+set global event_scheduler=0;
+select sleep(2);
+sleep(2)
+0
+show processlist;
+Id User Host db Command Time State Info
+1 root localhost events_test Query 0 NULL show processlist
+2 event_scheduler NULL Connect 3 Sleeping NULL
+4 root events_test Connect 3 User lock select get_lock("test_lock2_1", 20)
+select release_lock("test_lock2_1");
+release_lock("test_lock2_1")
+1
+select sleep(2);
+sleep(2)
+0
+show processlist;
+Id User Host db Command Time State Info
+1 root localhost events_test Query 0 NULL show processlist
+drop event закачка21;
+set global event_scheduler=1;
+select get_lock("test_lock3", 20);
+get_lock("test_lock3", 20)
+1
+create event закачка on schedule every 10 hour do select get_lock("test_lock3", 20);
+select sleep(2);
+sleep(2)
+0
+show processlist;
+Id User Host db Command Time State Info
+1 root localhost events_test Query 0 NULL show processlist
+5 event_scheduler NULL Connect 2 Sleeping NULL
+6 root events_test Connect 2 User lock select get_lock("test_lock3", 20)
+drop event закачка;
+select release_lock("test_lock3");
+release_lock("test_lock3")
+1
+set global event_scheduler=0;
+select sleep(2);
+sleep(2)
+0
+show processlist;
+Id User Host db Command Time State Info
+1 root localhost events_test Query 0 NULL show processlist
+drop database events_test;