mirror of
https://github.com/MariaDB/server.git
synced 2025-01-20 05:52:27 +01:00
98db230086
when there are no up-to-date system tables to support it: - initialize the scheduler before reporting "Ready for connections". This ensures that warnings, if any, are printed before "Ready for connections", and this message is not mangled. - do not abort the scheduler if there are no system tables - check the tables once at start up, remember the status and disable the scheduler if the tables are not up to date. If one attempts to use the scheduler with bad tables, issue an error message. - clean up the behaviour of the module under LOCK TABLES and pre-locking mode - make sure implicit commit of Events DDL works as expected. - add more tests Collateral clean ups in the events code. This patch fixes Bug#23631 Events: SHOW VARIABLES doesn't work when mysql.event is damaged
41 lines
1.4 KiB
Text
41 lines
1.4 KiB
Text
# Can't test with embedded server that doesn't support grants
|
|
-- source include/not_embedded.inc
|
|
|
|
use events_test;
|
|
# Event scheduler should be disabled: the system tables are damaged
|
|
select @@event_scheduler;
|
|
# Try various Event Scheduler operation and check the output.
|
|
--error ER_EVENTS_DB_ERROR
|
|
show events;
|
|
--error ER_EVENTS_DB_ERROR
|
|
select event_name from information_schema.events;
|
|
--error ER_EVENTS_DB_ERROR
|
|
show create event intact_check;
|
|
--error ER_EVENTS_DB_ERROR
|
|
drop event no_such_event;
|
|
--error ER_EVENTS_DB_ERROR
|
|
create event intact_check_1 on schedule every 5 hour do select 5;
|
|
--error ER_EVENTS_DB_ERROR
|
|
alter event intact_check_1 on schedule every 8 hour do select 8;
|
|
--error ER_EVENTS_DB_ERROR
|
|
alter event intact_check_1 rename to intact_check_2;
|
|
--error ER_EVENTS_DB_ERROR
|
|
drop event intact_check_1;
|
|
--error ER_EVENTS_DB_ERROR
|
|
drop event intact_check_2;
|
|
--error ER_EVENTS_DB_ERROR
|
|
drop event intact_check;
|
|
--error ER_EVENTS_DB_ERROR
|
|
set global event_scheduler=on;
|
|
--error ER_EVENTS_DB_ERROR
|
|
set global event_scheduler=off;
|
|
show variables like 'event_scheduler';
|
|
--echo Make sure that we still can create and drop databases,
|
|
--echo and no warnings are produced.
|
|
drop database if exists mysqltest_database_not_exists;
|
|
create database mysqltest_db1;
|
|
drop database mysqltest_db1;
|
|
--echo Restore the original mysql.event table
|
|
drop table mysql.event;
|
|
rename table event_like to mysql.event;
|
|
--echo Now let's restart the server again
|