Bug #43587 | Putting event_scheduler=1 in init SQL file crashes mysqld | ||
---|---|---|---|
Submitted: | 12 Mar 2009 11:44 | Modified: | 7 Aug 2009 20:24 |
Reporter: | Geert Vanderkelen | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Stored Routines | Severity: | S3 (Non-critical) |
Version: | 5.1.32 | OS: | Any (Linux) |
Assigned to: | Davi Arnaut | CPU Architecture: | Any |
[12 Mar 2009 11:44]
Geert Vanderkelen
[12 Mar 2009 11:45]
Geert Vanderkelen
Verified using 5.1.32-community on CentOS 5.2 (MySQL-server-community-5.1.32-0.rhel5)
[11 Jun 2009 8:11]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/76097 2936 Christoffer Hall 2009-06-11 Bug#43587: Putting event_scheduler=1 in init SQL file crashes mysqld If the event scheduler is enabled in an init sql file mysqld crashes. When the init sql file containing "SET GLOBAL event_scheduler = 1" gets executed before events are configured in my.cnf mysqld crashes because switching scheduler state assumes events are initialized. The solution is to initialize the event system on demand, unless events are disabled on the commandline.
[22 Jun 2009 9:57]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/76799 2968 Christoffer Hall 2009-06-22 BUG#43587 Putting event_scheduler=1 in init SQL file crashes mysqld Second patch to fix the problem. Trying to dynamically init events doesn't work as early as when init_file= is run. So issuing a warining that events cannot be set so early is issued and default values (or values set in my.cnf) will be loaded later.
[29 Jun 2009 9:08]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/77432 2982 Christoffer Hall 2009-06-29 BUG#43587 Putting event_scheduler=1 in init SQL file crashes mysqld Second patch to fix the problem. Trying to dynamically init events doesn't work as early as when init_file= is run. The problem is that some code depends on thread_count going to zero and if events are inited, the event thread will be around. So initialization freezes. Issuing a warning that events cannot be set so early is issued and default values (or values set in my.cnf) will be loaded later seems like the most tractable solution.
[24 Jul 2009 16:21]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/79263 3041 Konstantin Osipov 2009-07-24 Code review for Bug#43587 Putting event_scheduler=1 in init SQL file crashes mysqld
[24 Jul 2009 18:27]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/79272 3042 Davi Arnaut 2009-07-24 [merge] 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.
[24 Jul 2009 18:46]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/79273 3042 Davi Arnaut 2009-07-24 [merge] 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.
[24 Jul 2009 19:12]
Davi Arnaut
Queued to 5.1-bugteam
[27 Jul 2009 19:04]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/79365 3041 Davi Arnaut 2009-07-27 Post-merge fix for Bug#43587: Handle failures to execute a statement during bootstrap on a embedded server. @ libmysqld/lib_sql.cc Handle a failure during bootstrap.
[4 Aug 2009 19:50]
Bugs System
Pushed into 5.4.4-alpha (revid:alik@sun.com-20090804194615-h40sa098mx4z49qg) (version source revid:davi.arnaut@sun.com-20090727191546-d0glf93zrlefm0mq) (merge vers: 5.4.4-alpha) (pib:11)
[4 Aug 2009 20:45]
Bugs System
Pushed into 5.1.38 (revid:davi.arnaut@sun.com-20090804204317-ggodqkik7de6nfpz) (version source revid:davi.arnaut@sun.com-20090804204317-ggodqkik7de6nfpz) (merge vers: 5.1.38) (pib:11)
[7 Aug 2009 20:24]
Paul DuBois
Noted in 5.1.38, 5.4.4 changelogs. Enabling the event scheduler from within the file specified by --init-file caused a server crash.
[12 Aug 2009 22:40]
Paul DuBois
Noted in 5.4.2 changelog because next 5.4 version will be 5.4.2 and not 5.4.4.
[15 Aug 2009 1:57]
Paul DuBois
Ignore previous comment about 5.4.2.
[1 Oct 2009 5:58]
Bugs System
Pushed into 5.1.39-ndb-6.3.28 (revid:jonas@mysql.com-20091001055605-ap2kiaarr7p40mmv) (version source revid:jonas@mysql.com-20091001055605-ap2kiaarr7p40mmv) (merge vers: 5.1.39-ndb-6.3.28) (pib:11)
[1 Oct 2009 7:25]
Bugs System
Pushed into 5.1.39-ndb-7.0.9 (revid:jonas@mysql.com-20091001072547-kv17uu06hfjhgjay) (version source revid:jonas@mysql.com-20091001071652-irejtnumzbpsbgk2) (merge vers: 5.1.39-ndb-7.0.9) (pib:11)
[1 Oct 2009 13:25]
Bugs System
Pushed into 5.1.39-ndb-7.1.0 (revid:jonas@mysql.com-20091001123013-g9ob2tsyctpw6zs0) (version source revid:jonas@mysql.com-20091001123013-g9ob2tsyctpw6zs0) (merge vers: 5.1.39-ndb-7.1.0) (pib:11)
[5 Oct 2009 10:50]
Bugs System
Pushed into 5.1.39-ndb-6.2.19 (revid:jonas@mysql.com-20091005103850-dwij2dojwpvf5hi6) (version source revid:jonas@mysql.com-20090930185117-bhud4ek1y0hsj1nv) (merge vers: 5.1.39-ndb-6.2.19) (pib:11)
[8 Oct 2009 2:48]
Paul DuBois
The 5.4 fix has been pushed to 5.4.2.