Bug #35997 Event scheduler seems to let the server crash, if it is embedded.
Submitted: 11 Apr 16:11 Modified: 22 May 14:16
Reporter: Horst Hunger
Status: Closed
Category:Server: SP Severity:S1 (Critical)
Version:5.1.24-rc OS:Any (embedded server)
Assigned to: Kristofer Pettersson Target Version:5.0+
Triage: D2 (Serious)

[11 Apr 16:11] Horst Hunger
Description:
The new two test program have the following log entries in case of running embedded:
main.event_scheduler_basic     [ fail ]

ERROR: mysqltest returned unexpected code 139, it has probably crashed

Stopping All Servers
Restoring snapshot of databases
Resuming Tests

main.event_scheduler_func      [ fail ]

ERROR: mysqltest returned unexpected code 139, it has probably crashed

Stopping All Servers
Restoring snapshot of databases
Resuming Tests

main.events_1                  [ skipped ]   Test requires: 'not_embedded'

See also
https://intranet.mysql.com/secure/pushbuild/getlog.pl?dir=mysql-5.1-build&entry=cmiller@zi
ppy.cornsilk.net-20080411052932&name=test_embedded&plat=sapsrv1

How to repeat:
execute the main tests
main.event_scheduler_basic.test
and
main.event_scheduler_func.test

Test are disabled.

Suggested fix:
Usage on the events should be rejected with an error.
[11 Apr 16:14] Andrey Hristov
Yes, the events should be disabled in embedded server. Even they should be compiled out,
which won't be too hard to implement as the code is not spread all around the server.
[11 Apr 22:31] Sveta Smirnova
Thank you for the report.

I can not find specified tests nor in mysql-5.1.24-rc source package, neither in mysql-5.1
main tree. Which sources do you use?
[7 May 12:16] 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/46446

ChangeSet@1.2605, 2008-05-07 12:15:31+02:00, thek@adventure.(none) +5 -0
  Bug#35997 Event scheduler seems to let the server crash, if it is embedded.
  
  The event scheduler was not designed to work in embedded mode. This
  patch disables the system variable 'event_scheduler' used to activate
  the event scheduler when the server is compiled in embedded mode.
[7 May 14: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/46452

ChangeSet@1.2605, 2008-05-07 14:57:23+02:00, thek@adventure.(none) +9 -0
  Bug#35997 Event scheduler seems to let the server crash, if it is embedded.
  
  The event scheduler was not designed to work in embedded mode. This
  patch disables the system variable 'event_scheduler' used to activate
  the event scheduler when the server is compiled in embedded mode.
[8 May 12:13] 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/46502

ChangeSet@1.2605, 2008-05-08 12:12:39+02:00, thek@adventure.(none) +20 -0
  Bug#35997 Event scheduler seems to let the server crash, if it is embedded.
  
  The event scheduler was not designed to work in embedded mode. This
  patch disables and excludes the event scheduler when the server is
  compiled for embedded build.
[9 May 9:43] 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/46551

ChangeSet@1.2605, 2008-05-09 09:43:02+02:00, thek@adventure.(none) +20 -0
  Bug#35997 Event scheduler seems to let the server crash, if it is embedded.
  
  The event scheduler was not designed to work in embedded mode. This
  patch disables and excludes the event scheduler when the server is
  compiled for embedded build.
[9 May 10:26] 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/46553

ChangeSet@1.2619, 2008-05-09 10:26:06+02:00, thek@adventure.(none) +1 -0
  Bug#35997 Event scheduler seems to let the server crash, if it is embedded.
  
  Missing file: include/is_embedded.inc
  
  This file was left out of the initial changeset by misstake.
[9 May 11:10] 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/46555

ChangeSet@1.2620, 2008-05-09 11:10:36+02:00, thek@adventure.(none) +3 -0
  Bug#35997 Event scheduler seems to let the server crash, if it is embedded.
  
  Enable previously disabled test cases which were tested against
  the embedded build. The test cases are modified so that they require
  non-embedded build.
[9 May 12: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/46559

ChangeSet@1.2661, 2008-05-09 12:56:54+02:00, thek@adventure.(none) +1 -0
  Bug#35997 Event scheduler seems to let the server crash, if it is embedded.
  
  Part 2.
  This patch disable event scheduler code related to the online backup
  subsystem introduced in 6.0.
[9 May 15:10] Rafal Somla
Good to push.
[9 May 16:10] 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/46566

ChangeSet@1.2661, 2008-05-09 16:09:52+02:00, thek@adventure.(none) +1 -0
  Bug#35997 Event scheduler seems to let the server crash, if it is embedded.
  
  Part 2.
  This patch fixes event related methods in object services API (si_objects.c)
  so that they behave well also when events are disabled in the server.
[9 May 16:59] 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/46568

ChangeSet@1.2621, 2008-05-09 16:59:32+02:00, thek@adventure.(none) +3 -0
  Bug#35997 Event scheduler seems to let the server crash, if it is embedded.
  
  SHOW commands fail in embedded mode because schema_table array doesn't
  correspond to enum_schema_tables.
[9 May 17:22] Kristofer Pettersson
Progress report: Pondering implementing dummy_fill_schema_event to avoid touching I_S
subsystem instead of pushing last patch.
[12 May 11:58] 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/46618

ChangeSet@1.2621, 2008-05-12 11:58:10+02:00, thek@adventure.(none) +2 -0
  Bug#35997 Event scheduler seems to let the server crash, if it is embedded.
  
  SHOW commands fail in embedded mode because schema_table array doesn't
  correspond to enum_schema_tables.
  
  This patch implements a dummy implementation of the abstract fill_table
  function to be used when the event scheduler (or other core feature)
  isn't part of the build.
[12 May 12:09] 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/46619

ChangeSet@1.2621, 2008-05-12 12:09:10+02:00, thek@adventure.(none) +2 -0
  Bug#35997 Event scheduler seems to let the server crash, if it is embedded.
  
  SHOW commands fail in embedded mode because schema_table array doesn't
  correspond to enum_schema_tables.
  
  This patch implements a dummy implementation of the abstract fill_table
  function to be used when the event scheduler (or other core feature)
  isn't part of the build.
[13 May 14:06] 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/46647

ChangeSet@1.2626, 2008-05-13 14:06:32+02:00, thek@adventure.(none) +6 -0
  Bug#35997 Event scheduler seems to let the server crash, if it is embedded.
  
  Fixed build failure depending on events in embedded build.
[14 May 17:20] Bugs System
Pushed into 5.1.25-rc
[15 May 3:38] Paul DuBois
Noted in 5.1.25 changelog.

The Event Scheduler was not designed to work under the embedded 
server. It is now disabled for the embedded server, and the
event_scheduler system variable is not displayed.

Also documented in libmysqld section that the Event Scheduler is not available.

Setting report to Patch queued pending push into 6.0.x.
[15 May 17:52] Paul DuBois
Setting report to Need Doc Info pending push into 6.0.x.
[22 May 11:49] Bugs System
Pushed into 6.0.6-alpha
[22 May 14:16] Paul DuBois
Noted in 6.0.6 changelog.