diff options
author | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2009-07-24 15:45:42 -0300 |
---|---|---|
committer | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2009-07-24 15:45:42 -0300 |
commit | 8ec2f3d0d1943a282648bd0fe708539a539b18cc (patch) | |
tree | 97c922ce909fe27e454cb40b715ce727b941f8f3 /mysql-test/std_data | |
parent | 2bc6b6a80099ddb5b57e3d3c8be120e6596daa08 (diff) | |
parent | b4bf7dd31e39cd98f5794e4d7ef71cf03d0669dd (diff) | |
download | mariadb-git-8ec2f3d0d1943a282648bd0fe708539a539b18cc.tar.gz |
Bug#43587: Putting event_scheduler=1 in init SQL file crashes
mysqld
The problem was that enabling the event scheduler inside a init
file caused the server to crash upon start-up. The crash occurred
because the event scheduler wasn't being initialized before the
commands in the init-file are processed.
The solution is to initialize the event scheduler before the init
file is read. The patch also disables the event scheduler during
bootstrap and makes the bootstrap operation robust in the
presence of background threads.
mysql-test/std_data/init_file.dat:
Add test case for Bug#43587
sql/event_scheduler.cc:
Signal that the thread_count has been decremented.
sql/events.cc:
Disable the event scheduler during bootstrap.
sql/mysql_priv.h:
Export variable.
sql/mysqld.cc:
Initialize the event scheduler before commands are executed.
sql/sql_parse.cc:
Signal that the bootstrap thread is done.
Diffstat (limited to 'mysql-test/std_data')
-rw-r--r-- | mysql-test/std_data/init_file.dat | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mysql-test/std_data/init_file.dat b/mysql-test/std_data/init_file.dat index cb8e0778438..c05260837fe 100644 --- a/mysql-test/std_data/init_file.dat +++ b/mysql-test/std_data/init_file.dat @@ -35,4 +35,11 @@ CREATE DATABASE IF NOT EXISTS init_file; CREATE TABLE IF NOT EXISTS init_file.startup ( startdate DATETIME ); INSERT INTO init_file.startup VALUES ( NOW() ); +# +# Bug#43587 "Putting event_scheduler=1 in init SQL file crashes mysqld" +# +SET GLOBAL event_scheduler = 'ON'; +CREATE EVENT ev1 ON SCHEDULE EVERY 1 DAY DISABLE DO SELECT 1; +DROP EVENT ev1; +SET GLOBAL event_scheduler = 'OFF'; |