summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <andrey@example.com>2006-09-25 17:22:23 +0200
committerunknown <andrey@example.com>2006-09-25 17:22:23 +0200
commit070c8e74378657a9fa43ce00a3e48ed68755cc58 (patch)
treed1f158ab7e5979ad285205d1f007cb9be7421800
parent6c9400b93052d0217b0d90ba8e3da60033aeda72 (diff)
downloadmariadb-git-070c8e74378657a9fa43ce00a3e48ed68755cc58.tar.gz
Fix for bug#22662 Inconsistent values displayed for event_scheduler
when set to DISABLED It was a silly ordering number error. sql/events.h: fix ordinal number, the cause for bug #22662 Inconsistent values displayed for event_scheduler when set to DISABLED mysql-test/r/events_restart_phase0.result: New BitKeeper file ``mysql-test/r/events_restart_phase0.result'' mysql-test/t/events_restart_phase0.log: New BitKeeper file ``mysql-test/t/events_restart_phase0.log'' mysql-test/t/events_restart_phase0.result: New BitKeeper file ``mysql-test/t/events_restart_phase0.result''
-rw-r--r--mysql-test/r/events_restart_phase0.result22
-rw-r--r--mysql-test/t/events_restart_phase0.log22
-rw-r--r--mysql-test/t/events_restart_phase0.result22
-rw-r--r--sql/events.h2
4 files changed, 67 insertions, 1 deletions
diff --git a/mysql-test/r/events_restart_phase0.result b/mysql-test/r/events_restart_phase0.result
new file mode 100644
index 00000000000..218b804a302
--- /dev/null
+++ b/mysql-test/r/events_restart_phase0.result
@@ -0,0 +1,22 @@
+SHOW VARIABLES LIKE 'event%';
+Variable_name Value
+event_scheduler DISABLED
+SELECT @@global.event_scheduler;
+@@global.event_scheduler
+DISABLED
+SET GLOBAL event_scheduler=on;
+ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement
+SET GLOBAL event_scheduler=off;
+ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement
+SET GLOBAL event_scheduler=0;
+ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement
+SET GLOBAL event_scheduler=1;
+ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement
+SET GLOBAL event_scheduler=2;
+ERROR 42000: Variable 'event_scheduler' can't be set to the value of '2'
+SET GLOBAL event_scheduler=SUSPEND;
+ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'SUSPEND'
+SET GLOBAL event_scheduler=SUSPENDED;
+ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'SUSPENDED'
+SET GLOBAL event_scheduler=disabled;
+ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'disabled'
diff --git a/mysql-test/t/events_restart_phase0.log b/mysql-test/t/events_restart_phase0.log
new file mode 100644
index 00000000000..218b804a302
--- /dev/null
+++ b/mysql-test/t/events_restart_phase0.log
@@ -0,0 +1,22 @@
+SHOW VARIABLES LIKE 'event%';
+Variable_name Value
+event_scheduler DISABLED
+SELECT @@global.event_scheduler;
+@@global.event_scheduler
+DISABLED
+SET GLOBAL event_scheduler=on;
+ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement
+SET GLOBAL event_scheduler=off;
+ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement
+SET GLOBAL event_scheduler=0;
+ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement
+SET GLOBAL event_scheduler=1;
+ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement
+SET GLOBAL event_scheduler=2;
+ERROR 42000: Variable 'event_scheduler' can't be set to the value of '2'
+SET GLOBAL event_scheduler=SUSPEND;
+ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'SUSPEND'
+SET GLOBAL event_scheduler=SUSPENDED;
+ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'SUSPENDED'
+SET GLOBAL event_scheduler=disabled;
+ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'disabled'
diff --git a/mysql-test/t/events_restart_phase0.result b/mysql-test/t/events_restart_phase0.result
new file mode 100644
index 00000000000..218b804a302
--- /dev/null
+++ b/mysql-test/t/events_restart_phase0.result
@@ -0,0 +1,22 @@
+SHOW VARIABLES LIKE 'event%';
+Variable_name Value
+event_scheduler DISABLED
+SELECT @@global.event_scheduler;
+@@global.event_scheduler
+DISABLED
+SET GLOBAL event_scheduler=on;
+ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement
+SET GLOBAL event_scheduler=off;
+ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement
+SET GLOBAL event_scheduler=0;
+ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement
+SET GLOBAL event_scheduler=1;
+ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement
+SET GLOBAL event_scheduler=2;
+ERROR 42000: Variable 'event_scheduler' can't be set to the value of '2'
+SET GLOBAL event_scheduler=SUSPEND;
+ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'SUSPEND'
+SET GLOBAL event_scheduler=SUSPENDED;
+ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'SUSPENDED'
+SET GLOBAL event_scheduler=disabled;
+ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'disabled'
diff --git a/sql/events.h b/sql/events.h
index b5d2866aa38..79c4a419388 100644
--- a/sql/events.h
+++ b/sql/events.h
@@ -55,7 +55,7 @@ public:
{
EVENTS_OFF= 0,
EVENTS_ON= 1,
- EVENTS_DISABLED= 5
+ EVENTS_DISABLED= 4
};
static enum_opt_event_scheduler opt_event_scheduler;