mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Bug #31332 --event-scheduler option misbehaving
Changed the behaviour of the --event-scheduler option when used without an arguments. It now turns the option on. mysql-test/r/events_bugs.result: Test that --event-scheduler with no options in events_bugs-master.opt turns the option on. mysql-test/t/events_bugs.test: Test that --event-scheduler with no options in events_bugs-master.opt turns the option on. sql/events.cc: Changed the behaviour of the --event-scheduler option when used without an arguments. It now turns the option on. mysql-test/t/events_bugs-master.opt: Test that --event-scheduler with no options in events_bugs-master.opt turns the option on.
This commit is contained in:
@ -3,6 +3,10 @@ drop database if exists mysqltest_db1;
|
|||||||
drop database if exists mysqltest_db2;
|
drop database if exists mysqltest_db2;
|
||||||
create database events_test;
|
create database events_test;
|
||||||
use events_test;
|
use events_test;
|
||||||
|
select * from information_schema.global_variables where variable_name like 'event_scheduler';
|
||||||
|
VARIABLE_NAME VARIABLE_VALUE
|
||||||
|
EVENT_SCHEDULER ON
|
||||||
|
SET GLOBAL event_scheduler = 'OFF';
|
||||||
CREATE EVENT lower_case ON SCHEDULE EVERY 1 MINUTE DO SELECT 1;
|
CREATE EVENT lower_case ON SCHEDULE EVERY 1 MINUTE DO SELECT 1;
|
||||||
CREATE EVENT Lower_case ON SCHEDULE EVERY 2 MINUTE DO SELECT 2;
|
CREATE EVENT Lower_case ON SCHEDULE EVERY 2 MINUTE DO SELECT 2;
|
||||||
ERROR HY000: Event 'Lower_case' already exists
|
ERROR HY000: Event 'Lower_case' already exists
|
||||||
|
1
mysql-test/t/events_bugs-master.opt
Normal file
1
mysql-test/t/events_bugs-master.opt
Normal file
@ -0,0 +1 @@
|
|||||||
|
--event-scheduler
|
@ -9,6 +9,21 @@ drop database if exists mysqltest_db2;
|
|||||||
create database events_test;
|
create database events_test;
|
||||||
use events_test;
|
use events_test;
|
||||||
|
|
||||||
|
#
|
||||||
|
# START: Bug #31332 --event-scheduler option misbehaving
|
||||||
|
#
|
||||||
|
|
||||||
|
# NOTE!! this test must come first! It's testing that the --event-scheduler
|
||||||
|
# option with no argument in events_bugs-master.opt turns the scheduler on.
|
||||||
|
|
||||||
|
select * from information_schema.global_variables where variable_name like 'event_scheduler';
|
||||||
|
|
||||||
|
SET GLOBAL event_scheduler = 'OFF';
|
||||||
|
|
||||||
|
#
|
||||||
|
# END: Bug #31332
|
||||||
|
#
|
||||||
|
|
||||||
#
|
#
|
||||||
# START - 16415: Events: event names are case sensitive
|
# START - 16415: Events: event names are case sensitive
|
||||||
#
|
#
|
||||||
|
@ -146,7 +146,7 @@ bool
|
|||||||
Events::set_opt_event_scheduler(char *argument)
|
Events::set_opt_event_scheduler(char *argument)
|
||||||
{
|
{
|
||||||
if (argument == NULL)
|
if (argument == NULL)
|
||||||
opt_event_scheduler= Events::EVENTS_DISABLED;
|
opt_event_scheduler= Events::EVENTS_ON;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int type;
|
int type;
|
||||||
|
Reference in New Issue
Block a user