Bug #37445 Do not automatically enable restored events.
Submitted: 17 Jun 2008 10:07 Modified: 24 Feb 2010 23:31
Reporter: Rafal Somla Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Backup Severity:S4 (Feature request)
Version: OS:Any
Assigned to: Chuck Bell CPU Architecture:Any

[17 Jun 2008 10:07] Rafal Somla
Description:
When restoring database containing events, these events will became immediately active and start to fire. But a DBA might prefer to have them initially disabled and re-enable them manually when he verifies that the database is consistent after restore. Currently such scenario is not possible.

Note that a partial solution is to switch off event scheduler when restoring data. But this would block any triggers, not only the ones being restored.

How to repeat:
Backup database with enabled events. Then restore it and see that events start to fire as soon as RESTORE completes.

Suggested fix:
There is SLAVESIDE_DISABLED state of events, given to the events replicated from master. A similar mechanism could be used here.

Instead of creating yet another event state (like RESTORE_DISABLED) it would be better to rename SLAVESIDE_DISABLED to something more general, like AUTO_DISABLED. Restored events which were enabled at backup time would become AUTO_DISABLED after restore. Then DBA could find all such events and ENABLE them if he wishes so.
[19 Mar 2009 23:43] Chuck Bell
The use of SLAVESIDE_DISABLED is two part; 1) to disable a replicated event, and 2) to allow the administrator to detect which events were replicated from the master. Therefore using one DISABLED event to disable both replicated events and (temporarily) disabled restored events would be confusing if a restore was run on a slave with disabled replicated events. The administrator would loose the ability to easily determine the replicated events.

Thus a better design is to create a new mechanism (possibly another disabled state) for temporarily blocking restored events.
[19 Mar 2009 23:50] Chuck Bell
Design Option 1
---------------
Create a RESTORE_DISABLED state that restore sets all events to when restored. These events would be enabled when restore completes. 
Create an option for the RESTORE command to allow users to skip enabling restored events (e.g. RESTORE FROM ... DISABLE_EVENTS;).

Design Option 2
---------------
Create a mechanism in the server code to disable events for a given database.
[20 Mar 2009 6:54] Rafal Somla
I'm not sure if it is good idea to use event state to find out whether given event was restored or replicated or anything else of that sort. Would be better to provide this information by other means - for example, in case of RESTORE, the list of events being restored could be read from the backup image or reported by RESTORE.

Even now, the information inferred from event state is incomplete. Only events disabled on master are marked as SLAVESIDE_DISABLED after replicating them. ENABLED events remain ENABLED on slave and they can't be distinguished from other enabled events which were not replicated.
[14 May 2009 17:40] Chuck Bell
Here is an alternative solution that will preserve the original state of the events on restore. I think this is much more reasonable than using a new disabled state and/or reuse (overuse really) the SLAVESIDE_DISABLED state.

1. On backup, we make a list of the events that are enabled and store that list in the catalog. As the events are added to the list, disable them on the server. Note: This would produce the correct CREATE EVENT statements for restore so that all events in the backup image are initially disabled on restore.

2. After backup, read the list of disabled events and enable them.

3. After restore, read the list of disabled events from the catalog and enable them.

Notes:
* Some events may already be disabled and therefore should remain disabled on restore.
* Steps 2 and 3 can use the same code.
* We would use execute_direct to execute "ALTER EVENT <db.name> ENABLE;"
* Would have to add only one list to the catalog which should not require changes to the backup image format. But may require minor changes to the stream library.

An addendum to this solution could include the following (but are not necessary to solve the bug):

* An option on backup to turn off the event disable during backup. There may be a reason (but I cannot think of a scenario) for doing this. It would be a simple addition.

* An option to disable all events on restore. This will override the solution above and leave all events disabled. Again, I see no need for this but it would be easy to add.
[18 Jun 2009 14:42] Chuck Bell
<from 27 May Backup Meeting>

1. Design of BUG#37445 - new state or disable mechanism proposed? 

PROBLEM:                                                                        
   a) DBA might want restored events to be restored as
       disabled.                
   b) Events that are restored should not in a bad way interact
      with the restoration of other objects.
   c) There can possibly be an internal dependency between the 
      events (and triggers), so restoring these sequentially might
      cause inconsistencies (this could be fixed by disabling the
      scheduler temporarily during restore)

   Rafal: Problem (b) is already solved since events are restored 
          as the very last objects.
   Ingo:  Same solution exists for triggers.

DECISION:
  - We skip implementing feature (a) for now.                                   
  - Problem (b), we think is minimized. 
  - Problem (c) is unlikely, so we won't work on this for now.
    So, we closed the discussion of this bug here, since it is
    not a tagged feature request.
[6 Nov 2009 21:03] Chuck Bell
Alternative Solution
--------------------
Turn off events during restore by calling a new obs:: function named disable_event(char *name) that issues an ALTER EVENT <name> DISABLE; statement following the creation of an event.

For all events disabled, keep a list of the names (db.event_name stored in the Restore_info class) and issue a warning message at the end of backup. This can be generated in one of the closing methods. 

The list shall also be written to the backup_progress log in the form of one row for each event disabled (to make it easier to automate).

The default behavior is to enable events on restore.

Users can disable events on restore via a session variable named 'disable_events_on_restore'. Note: if it is decided that the default behavior is to disable events on restore, the session variable would be named 'enable_events_on_restore'. The verbosity of the variable is intentional -- it gives the user a precise expectation of what it does.

Commentary
----------
This solution would avoid changing the catalog, would not require a new state for the event table, and would require little redesign of existing structures or algorithms.
[9 Nov 2009 17:18] Lars Thalmann
Minor comment:

I like "restore_enables_events" better than "enable_events_on_restore"
as the variable name, since the former will be alphabetically sorted
with other restore variables.  

I think a syntax extension "RESTORE DATABASE foo FROM 'bar.backup'
ENABLE EVENTS;" would be even better than a variable.
[10 Nov 2009 18:34] Chuck Bell
Minor change to design for conformity. It is better to write a separate warning for each event that is disabled. This conforms to how similar warnings are issued in the server.

A warning shall be issued to the console, the warning stack (so one can do 'SHOW WARNINGS'), and the backup progress log.
[10 Nov 2009 21:30] 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/90011

2889 Chuck Bell	2009-11-10
      BUG#37445 : Do not automatically enable restored events
      
      This bug is a feature request to disable events on restore.
      
      This patch implements a mechanism to disable all events on
      restore and communicate to the user which events were
      disabled. This list is written to the console, the warning
      stack, and the backup_progress log.
      
      The variable (option, global, sesson) restore_disables_events
      is ON by default but may be turned off. When turned OFF,
      events are not disabled on restore and they retain their
      original state from backup.
      
      Note: A number of option files were created to allow the
      older tests to run correctly and suppress the disabling of
      events on restore. 
     @ mysql-test/collections/default.experimental
        Removed test from experimental status.
     @ mysql-test/extra/scripts/monitor_disabled_tests/comments.txt
        Removed comment - no longer relevant.
     @ mysql-test/suite/backup/r/backup_events.result
        Corrected result file.
     @ mysql-test/suite/backup/r/backup_namecase.result
        Corrected result file.
     @ mysql-test/suite/backup/t/backup_bml_not_falcon-master.opt
        New option file to turn OFF restore_disables_events.
     @ mysql-test/suite/backup/t/backup_compression-master.opt
        New option file to turn OFF restore_disables_events.
     @ mysql-test/suite/backup/t/backup_errors_debug_1-master.opt
        Added option to turn OFF restore_disables_events.
     @ mysql-test/suite/backup/t/backup_errors_debug_2-master.opt
        New option file to turn OFF restore_disables_events.
     @ mysql-test/suite/backup/t/backup_errors_debug_3-master.opt
        New option file to turn OFF restore_disables_events.
     @ mysql-test/suite/backup/t/backup_events.test
        Replaced failing test with new test cases to test disabling
        of events on restore.
     @ mysql-test/suite/backup/t/backup_logs-master.opt
        New option file to turn OFF restore_disables_events.
     @ mysql-test/suite/backup/t/backup_namecase.test
        Changed test to suppress warnings and allow restore to
        disable events on restore.
     @ mysql-test/suite/backup/t/backup_objects-master.opt
        New option file to turn OFF restore_disables_events.
     @ mysql-test/suite/backup/t/backup_security-master.opt
        New option file to turn OFF restore_disables_events.
     @ mysql-test/suite/backup/t/backup_triggers_and_events-master.opt
        New option file to turn OFF restore_disables_events.
     @ sql/backup/kernel.cc
        Added code to detect when restore should disable events.
        Specifically, if either the session or global variable
        is set.
     @ sql/backup/logger.cc
        Added method to report which events are disabled as a
        warning.
     @ sql/backup/logger.h
        Added method declaration for reporting which events were
        disabled.
     @ sql/mysqld.cc
        Added startup option handler.
     @ sql/set_var.cc
        Added new variable handler.
     @ sql/share/errmsg-utf8.txt
        New error/warning message.
     @ sql/share/errmsg.txt
        New error/warning message.
     @ sql/si_objects.cc
        Added method to disable an event. Note: It was necessary
        to use a direct update statement here to avoid changing
        the modified by and other columns. Only the state is
        changed.
     @ sql/si_objects.h
        Added method declaration to disable an event.
     @ sql/sql_class.h
        Added system variable.
[10 Nov 2009 21:48] 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/90016

2889 Chuck Bell	2009-11-10
      BUG#37445 : Do not automatically enable restored events
      
      This bug is a feature request to disable events on restore.
      
      This patch implements a mechanism to disable all events on
      restore and communicate to the user which events were
      disabled. This list is written to the console, the warning
      stack, and the backup_progress log.
      
      The variable (option, global, sesson) restore_disables_events
      is ON by default but may be turned off. When turned OFF,
      events are not disabled on restore and they retain their
      original state from backup.
      
      Note: A number of option files were created to allow the
      older tests to run correctly and suppress the disabling of
      events on restore. 
     @ mysql-test/suite/backup/r/backup_events.result
        Corrected result file.
     @ mysql-test/suite/backup/r/backup_namecase.result
        Corrected result file.
     @ mysql-test/suite/backup/t/backup_bml_not_falcon-master.opt
        New option file to turn OFF restore_disables_events.
     @ mysql-test/suite/backup/t/backup_compression-master.opt
        New option file to turn OFF restore_disables_events.
     @ mysql-test/suite/backup/t/backup_errors_debug_1-master.opt
        Added option to turn OFF restore_disables_events.
     @ mysql-test/suite/backup/t/backup_errors_debug_2-master.opt
        New option file to turn OFF restore_disables_events.
     @ mysql-test/suite/backup/t/backup_errors_debug_3-master.opt
        New option file to turn OFF restore_disables_events.
     @ mysql-test/suite/backup/t/backup_events.test
        Replaced failing test with new test cases to test disabling
        of events on restore.
     @ mysql-test/suite/backup/t/backup_logs-master.opt
        New option file to turn OFF restore_disables_events.
     @ mysql-test/suite/backup/t/backup_namecase.test
        Changed test to suppress warnings and allow restore to
        disable events on restore.
     @ mysql-test/suite/backup/t/backup_objects-master.opt
        New option file to turn OFF restore_disables_events.
     @ mysql-test/suite/backup/t/backup_security-master.opt
        New option file to turn OFF restore_disables_events.
     @ mysql-test/suite/backup/t/backup_triggers_and_events-master.opt
        New option file to turn OFF restore_disables_events.
     @ sql/backup/kernel.cc
        Added code to detect when restore should disable events.
        Specifically, if either the session or global variable
        is set.
     @ sql/backup/logger.cc
        Added method to report which events are disabled as a
        warning.
     @ sql/backup/logger.h
        Added method declaration for reporting which events were
        disabled.
     @ sql/mysqld.cc
        Added startup option handler.
     @ sql/set_var.cc
        Added new variable handler.
     @ sql/share/errmsg-utf8.txt
        New error/warning message.
     @ sql/share/errmsg.txt
        New error/warning message.
     @ sql/si_objects.cc
        Added method to disable an event. Note: It was necessary
        to use a direct update statement here to avoid changing
        the modified by and other columns. Only the state is
        changed.
     @ sql/si_objects.h
        Added method declaration to disable an event.
     @ sql/sql_class.h
        Added system variable.
[16 Nov 2009 17: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/90547

2889 Chuck Bell	2009-11-16
      BUG#37445 : Do not automatically enable restored events
      
      This bug is a feature request to disable events on restore.
      
      This patch implements a mechanism to disable all events on
      restore and communicate to the user which events were
      disabled. This list is written to the console, the warning
      stack, and the backup_progress log.
      
      The variable (option, global, sesson) restore_disables_events
      is ON by default but may be turned off. When turned OFF,
      events are not disabled on restore and they retain their
      original state from backup.
      
      Note: A number of option files were created to allow the
      older tests to run correctly and suppress the disabling of
      events on restore. 
     @ mysql-test/collections/default.experimental
        Removed test from experimental status.
     @ mysql-test/extra/scripts/monitor_disabled_tests/comments.txt
        Removed comment - no longer relevant.
     @ mysql-test/suite/backup/include/basic_data.inc
        Set event to disabled to avoid warnings. Restore will not
        disable a disabled event.
     @ mysql-test/suite/backup/include/bml_test.inc
        Mask for disabled event warning.
     @ mysql-test/suite/backup/include/test_for_error.inc
        Mask for disabled event warning.
     @ mysql-test/suite/backup/r/backup_bml_not_falcon.result
        Corrected result file.
     @ mysql-test/suite/backup/r/backup_compression.result
        Corrected result file.
     @ mysql-test/suite/backup/r/backup_errors_debug_1.result
        Corrected result file.
     @ mysql-test/suite/backup/r/backup_errors_debug_2.result
        Corrected result file.
     @ mysql-test/suite/backup/r/backup_errors_debug_3.result
        Corrected result file.
     @ mysql-test/suite/backup/r/backup_events.result
        Corrected result file.
     @ mysql-test/suite/backup/r/backup_logs.result
        Corrected result file.
     @ mysql-test/suite/backup/r/backup_namecase.result
        Corrected result file.
     @ mysql-test/suite/backup/r/backup_objects.result
        Corrected result file.
     @ mysql-test/suite/backup/r/backup_security.result
        Corrected result file.
     @ mysql-test/suite/backup/r/backup_triggers_and_events.result
        Corrected result file.
     @ mysql-test/suite/backup/t/backup_bml_not_falcon.test
        Added suppression of warnings.
     @ mysql-test/suite/backup/t/backup_compression.test
        Added suppression of warnings.
        Masked error number for disabled event warning.
     @ mysql-test/suite/backup/t/backup_events.test
        Replaced failing test with new test cases to test disabling
        of events on restore.
     @ mysql-test/suite/backup/t/backup_logs.test
        Disabled event to avoid warning on restore.
     @ mysql-test/suite/backup/t/backup_namecase.test
        Changed test to suppress warnings and allow restore to
        disable events on restore.
     @ mysql-test/suite/backup/t/backup_objects.test
        Added suppression of warnings.
        Masked error number for disabled event warning.
     @ mysql-test/suite/backup/t/backup_triggers_and_events.test
        Added suppression of warnings.
        Masked error number for disabled event warning.
     @ sql/backup/kernel.cc
        Added code to detect when restore should disable events.
     @ sql/backup/logger.cc
        Added method to report which events are disabled as a
        warning.
     @ sql/backup/logger.h
        Added method declaration for reporting which events were
        disabled.
     @ sql/mysqld.cc
        Added startup option handler.
     @ sql/set_var.cc
        Added new variable handler.
     @ sql/share/errmsg-utf8.txt
        New error/warning message.
     @ sql/share/errmsg.txt
        New error/warning message.
     @ sql/si_objects.cc
        Added method to disable an event. Note: It was necessary
        to use a direct update statement here to avoid changing
        the modified by and other columns. Only the state is
        changed.
     @ sql/si_objects.h
        Added method declaration to disable an event.
     @ sql/sql_class.h
        Added system variable.
[19 Nov 2009 14:51] Ingo Strüwing
Approved. Please find comments by email.
[24 Nov 2009 16:48] 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/91446

2893 Chuck Bell	2009-11-24
      BUG#37445 : Do not automatically enable restored events
      
      This bug is a feature request to disable events on restore.
      
      This patch implements a mechanism to disable all events on
      restore and communicate to the user which events were
      disabled. This list is written to the console, the warning
      stack, and the backup_progress log.
      
      The variable (option, global, session) restore_disables_events
      is ON by default but may be turned off. When turned OFF,
      events are not disabled on restore and they retain their
      original state from backup.
     @ mysql-test/collections/default.experimental
        Removed test from experimental status.
     @ mysql-test/extra/scripts/monitor_disabled_tests/comments.txt
        Removed comment - no longer relevant.
     @ mysql-test/suite/backup/include/basic_data.inc
        Set event to disabled to avoid warnings. Restore will not
        disable an event that was disabled at backup time.
     @ mysql-test/suite/backup/include/bml_test.inc
        Mask for disabled event warning.
     @ mysql-test/suite/backup/include/test_for_error.inc
        Mask for disabled event warning.
     @ mysql-test/suite/backup/r/backup_bml_not_falcon.result
        Corrected result file.
     @ mysql-test/suite/backup/r/backup_compression.result
        Corrected result file.
     @ mysql-test/suite/backup/r/backup_dbname_case.result
        Corrected result file.
     @ mysql-test/suite/backup/r/backup_errors_debug_1.result
        Corrected result file.
     @ mysql-test/suite/backup/r/backup_errors_debug_2.result
        Corrected result file.
     @ mysql-test/suite/backup/r/backup_errors_debug_3.result
        Corrected result file.
     @ mysql-test/suite/backup/r/backup_events.result
        Corrected result file.
     @ mysql-test/suite/backup/r/backup_logs.result
        Corrected result file.
     @ mysql-test/suite/backup/r/backup_namecase.result
        Corrected result file.
     @ mysql-test/suite/backup/r/backup_objects.result
        Corrected result file.
     @ mysql-test/suite/backup/r/backup_security.result
        Corrected result file.
     @ mysql-test/suite/backup/r/backup_triggers_and_events.result
        Corrected result file.
     @ mysql-test/suite/backup/t/backup_bml_not_falcon.test
        Added suppression of warnings.
     @ mysql-test/suite/backup/t/backup_compression.test
        Added suppression of warnings.
        Masked error number for disabled event warning.
     @ mysql-test/suite/backup/t/backup_dbname_case.test
        Turned off disable events on restore to avoid warnings and
        preserve original test.
     @ mysql-test/suite/backup/t/backup_events.test
        Replaced failing test with new test cases to test disabling
        of events on restore.
     @ mysql-test/suite/backup/t/backup_logs.test
        Disabled event to avoid warning on restore.
     @ mysql-test/suite/backup/t/backup_namecase.test
        Changed test to suppress warnings and allow restore to
        disable events on restore.
     @ mysql-test/suite/backup/t/backup_objects.test
        Added suppression of warnings.
        Masked error number for disabled event warning.
     @ mysql-test/suite/backup/t/backup_triggers_and_events.test
        Added suppression of warnings.
        Masked error number for disabled event warning.
     @ mysql-test/suite/backup/t/backup_xpfm_compat_restore_lctn0-master.opt
        Added option to turn disable events on restore OFF to
        preserve original test.
     @ mysql-test/suite/backup/t/backup_xpfm_compat_restore_lctn1-master.opt
        Added option to turn disable events on restore OFF to
        preserve original test.
     @ mysql-test/suite/backup/t/backup_xpfm_compat_restore_lctn2-master.opt
        Added option to turn disable events on restore OFF to
        preserve original test.
     @ sql/backup/kernel.cc
        Added code to detect when restore should disable events.
     @ sql/backup/logger.cc
        Added method to report which events are disabled as a
        warning.
     @ sql/backup/logger.h
        Added method declaration for reporting which events were
        disabled.
     @ sql/mysqld.cc
        Added startup option handler.
     @ sql/set_var.cc
        Added new variable handler.
     @ sql/share/errmsg-utf8.txt
        New error/warning message.
     @ sql/share/errmsg.txt
        New error/warning message.
     @ sql/si_objects.cc
        Added method to disable an event. Note: It was necessary
        to use a direct update statement here to avoid changing
        the modified by and other columns. Only the state is
        changed.
     @ sql/si_objects.h
        Added method declaration to disable an event.
     @ sql/sql_class.h
        Added system variable.
[11 Dec 2009 15:19] 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/93712

2891 Chuck Bell	2009-12-11
      BUG#37445 : Do not automatically enable restored events.
      
      Note: These are pushbuild fixes.
      
      Disable event in test to avoid warning message on restore.
     @ mysql-test/suite/rpl/include/rpl_backup_basic.inc
        Set event to DISABLE on create.
     @ mysql-test/suite/rpl/r/rpl_backup_extra.result
        Corrected result.
     @ mysql-test/suite/rpl/r/rpl_backup_multi.result
        Corrected result. Also fix missing warning - test
        should not be generating the warning.
     @ mysql-test/suite/rpl/r/rpl_backup_ptr.result
        Corrected result.
     @ mysql-test/suite/rpl/r/rpl_backup_shutdown.result
        Corrected result.
[11 Dec 2009 20:12] 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/93757

2908 Chuck Bell	2009-12-11
      BUG#37445 : Do not automatically enable restored events.
      
      Note: These are pushbuild fixes.
      
      Disable event in test to avoid warning message on restore.
     @ mysql-test/suite/rpl/include/rpl_backup_basic.inc
        Set event to DISABLE on create.
     @ mysql-test/suite/rpl/r/rpl_backup_extra.result
        Corrected result.
     @ mysql-test/suite/rpl/r/rpl_backup_multi.result
        Corrected result. Also fix missing warning - test
        should not be generating the warning.
     @ mysql-test/suite/rpl/r/rpl_backup_ptr.result
        Corrected result.
     @ mysql-test/suite/rpl/r/rpl_backup_shutdown.result
        Corrected result.
[12 Dec 2009 17:18] 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/93782

2906 Chuck Bell	2009-12-12
      BUG#37445 : Do not automatically enable restored events.
      
      Note: These are pushbuild fixes.
      
      Disable event in test to avoid warning message on restore.
     @ mysql-test/suite/rpl/include/rpl_backup_basic.inc
        Set event to DISABLE on create.
     @ mysql-test/suite/rpl/r/rpl_backup_extra.result
        Corrected result.
     @ mysql-test/suite/rpl/r/rpl_backup_multi.result
        Corrected result. Also fix missing warning - test
        should not be generating the warning.
     @ mysql-test/suite/rpl/r/rpl_backup_ptr.result
        Corrected result.
     @ mysql-test/suite/rpl/r/rpl_backup_shutdown.result
        Corrected result.
[12 Dec 2009 17:18] 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/93783

2905 Chuck Bell	2009-12-12
      BUG#37445 : Do not automatically enable restored events.
      
      Note: These are pushbuild fixes.
      
      Disable event in test to avoid warning message on restore.
     @ mysql-test/suite/rpl/include/rpl_backup_basic.inc
        Set event to DISABLE on create.
     @ mysql-test/suite/rpl/r/rpl_backup_extra.result
        Corrected result.
     @ mysql-test/suite/rpl/r/rpl_backup_multi.result
        Corrected result. Also fix missing warning - test
        should not be generating the warning.
     @ mysql-test/suite/rpl/r/rpl_backup_ptr.result
        Corrected result.
     @ mysql-test/suite/rpl/r/rpl_backup_shutdown.result
        Corrected result.
[15 Dec 2009 20: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/94284

2914 Chuck Bell	2009-12-15
      BUG#37445 : Do not automatically enable restored events.
      
      Note: These are pushbuild fixes.
      
      Disable event in test to avoid warning message on restore.
     @ mysql-test/suite/rpl/include/rpl_backup_basic.inc
        Set event to DISABLE on create.
     @ mysql-test/suite/rpl/r/rpl_backup_extra.result
        Corrected result.
     @ mysql-test/suite/rpl/r/rpl_backup_multi.result
        Corrected result.
     @ mysql-test/suite/rpl/r/rpl_backup_ptr.result
        Corrected result.
     @ mysql-test/suite/rpl/r/rpl_backup_shutdown.result
        Corrected result. Also fix missing warning - test
        should not be generating the warning.
[20 Feb 2010 9:18] Bugs System
Pushed into 6.0.14-alpha (revid:ingo.struewing@sun.com-20100218152520-s4v1ld76bif06eqn) (version source revid:ingo.struewing@sun.com-20100119103538-wtp5alpz4p2jayl5) (merge vers: 6.0.14-alpha) (pib:16)
[24 Feb 2010 23:31] Paul DuBois
Noted in 6.0.14 changelog.

MySQL Backup now has a restore_disables_events system variable that 
controls whether RESTORE disables Event Scheduler events that are
restored from the backup image. By default, this variable is enabled,
which disables restored events. If the variable is disabled, restored
events retain their state as recorded in the image.