summaryrefslogtreecommitdiff
path: root/mysql-test/r/events.result
diff options
context:
space:
mode:
authorunknown <andrey@example.com>2006-09-01 13:08:44 +0200
committerunknown <andrey@example.com>2006-09-01 13:08:44 +0200
commitda4734c3bcaacdab12832cad0419453bed2b805b (patch)
treec07ff5deb45ddb410295350324832ffabae0b2f9 /mysql-test/r/events.result
parentf18ec676a0b0be35068e2c464b39d92ac143ec5c (diff)
downloadmariadb-git-da4734c3bcaacdab12832cad0419453bed2b805b.tar.gz
WL#3337 (Event scheduler new architecture)
This is a post-review patch. Fixes the typelib implementation, available only in 5.1.11. --event-scheduler cmdline : DISABLED | ON | OFF | 0 | 1 DISABLED - makes the scheduler unavailable during the server run (ON|1)- When the server is started the scheduler will be started. It can be stopped and restarted by setting appropriate values to GLOBAL event_scheduler (OFF|0)- When the server is started, the scheduler won't be started. It can be started and again stopped by setting appropriate values to GLOBAL event_scheduler. _DEFAULT_ value The GLOBAL variable event_scheduler can have the following values: OFF | ON | 0 | 1 DISABLED is not possible and every attempt will end with an error that it's not a valid value for the variable. OFF | 0 - This is the pre-5.1.11 behavior - The scheduler stops, if not already stopped, and can be started again by setting the value of the variable to ON|1. ON | 1 - This is the pre-5.1.11 behavior - The scheduler starts, if not already started, and can be stopped again by setting the value of the variable to OFF|0. mysql-test/r/events.result: update result mysql-test/r/events_bugs.result: update result mysql-test/r/events_logs_tests.result: update result mysql-test/r/events_restart_phase1.result: update result mysql-test/r/events_restart_phase3.result: update result mysql-test/r/events_scheduling.result: update result mysql-test/r/events_stress.result: update result mysql-test/t/events.test: update test: 2 -> off 1 -> on mysql-test/t/events_bugs.test: update test: 2 -> off 1 -> on mysql-test/t/events_logs_tests.test: update test: 2 -> off 1 -> on mysql-test/t/events_restart_phase1.test: update test: 2 -> off 1 -> on mysql-test/t/events_restart_phase2-master.opt: update master file : 1 => on mysql-test/t/events_scheduling.test: update test: 2 -> off 1 -> on add tests for event_scheduler global variable representation from SHOW VARIABLES. mysql-test/t/events_stress.test: update test: 2 -> off 1 -> on sql/events.cc: Implement two different TYPELIBs for --event-scheduler cmd line option and for GLOBAL variable event_scheduler --event-scheduler cmdline : DISABLED | ON | OFF | 0 | 1 DISABLED - makes the scheduler unavailable during the server run (ON|1)- When the server is started the scheduler will be started. It can be stopped and restarted by setting appropriate values to GLOBAL event_scheduler (OFF|0)- When the server is started, the scheduler won't be started. It can be started and again stopped by setting appropriate values to GLOBAL event_scheduler. _DEFAULT_ value The GLOBAL variable event_scheduler can have the following values: OFF | ON | 0 | 1 DISABLED is not possible and every attempt will end with an error that it's not a valid value for the variable. OFF | 0 - This is the pre-5.1.11 behavior - The scheduler stops, if not already stopped, and can be started again by setting the value of the variable to ON|1. ON | 1 - This is the pre-5.1.11 behavior - The scheduler starts, if not already started, and can be stopped again by setting the value of the variable to OFF|0. sql/events.h: additional TYPELIB for GLOBAL event_scheduler sql/mysqld.cc: --event-scheduler should be checked against a TYPELIB and therefore should be GET_STR, as well as we make the parameter optional. When not provided OFF|0 is used. sql/set_var.cc: Implement typelib for event_scheduler variable. If allows both INT_RESULT -> 0 | 1 and STRING_RESULT -> OFF | ON The variable is shown as DISABLED | ON | OFF sql/set_var.h: Implement typelib, which expects both STRING and INT, for event_scheduler.
Diffstat (limited to 'mysql-test/r/events.result')
-rw-r--r--mysql-test/r/events.result18
1 files changed, 10 insertions, 8 deletions
diff --git a/mysql-test/r/events.result b/mysql-test/r/events.result
index 05b6ff03786..f19c44462c3 100644
--- a/mysql-test/r/events.result
+++ b/mysql-test/r/events.result
@@ -17,13 +17,13 @@ db_x
SHOW TABLES FROM db_x;
Tables_in_db_x
x_table
-SET GLOBAL event_scheduler=2;
+SET GLOBAL event_scheduler=off;
DROP EVENT e_x1;
DROP EVENT e_x2;
DROP DATABASE db_x;
DROP USER pauline@localhost;
USE events_test;
-SET GLOBAL event_scheduler=2;
+SET GLOBAL event_scheduler=off;
drop event if exists event1;
Warnings:
Note 1305 Event event1 does not exist
@@ -94,7 +94,7 @@ begin
alter event e_43 on schedule every 5 minute;
insert into test_nested values(1);
end|
-set global event_scheduler = 1;
+set global event_scheduler = on;
select db, name, body, status, interval_field, interval_value from mysql.event;
db name body status interval_field interval_value
events_test e_43 begin
@@ -113,7 +113,7 @@ drop event non_qualif_ev;
drop table non_qualif;
alter event non_existant rename to non_existant_too;
ERROR HY000: Unknown event 'non_existant'
-set global event_scheduler = 2;
+set global event_scheduler = off;
create event existant on schedule at now() + interval 1 year do select 12;
alter event non_existant rename to existant;
ERROR HY000: Event 'existant' already exists
@@ -315,12 +315,14 @@ ERROR HY000: Incorrect AT value: 'definitely not a datetime'
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=2;
+set event_scheduler=off;
ERROR HY000: Variable 'event_scheduler' is a GLOBAL variable and should be set with SET GLOBAL
set global event_scheduler=3;
ERROR 42000: Variable 'event_scheduler' can't be set to the value of '3'
+set global event_scheduler=disabled;
+ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'disabled'
"DISABLE the scheduler. Testing that it does not work when the variable is 0"
-set global event_scheduler=2;
+set global event_scheduler=off;
select definer, name, db from mysql.event;
definer name db
select get_lock("test_lock1", 20);
@@ -343,7 +345,7 @@ select count(*) from mysql.event;
count(*)
0
"ENABLE the scheduler and get a lock"
-set global event_scheduler=1;
+set global event_scheduler=on;
select get_lock("test_lock2", 20);
get_lock("test_lock2", 20)
1
@@ -371,7 +373,7 @@ select /*3*/ user, host, db, command, state, info from information_schema.proces
user host db command state info
event_scheduler localhost NULL Daemon Waiting for next activation NULL
root localhost events_test Connect User lock select get_lock("test_lock2_1", 20)
-set global event_scheduler=2;
+set global event_scheduler=off;
"Should have only our process now:"
select /*4*/ user, host, db, command, state, info from information_schema.processlist where info is null or info not like '%processlist%' order by info;
user host db command state info