Bug #16853 Events: mysqldump doesn't show events
Submitted: 27 Jan 2006 19:59 Modified: 15 Mar 2006 14:37
Reporter: Peter Gulutzan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.1.6-alpha-debug OS:Linux (SUSE 10.0)
Assigned to: Chad MILLER CPU Architecture:Any

[27 Jan 2006 19:59] Peter Gulutzan
Description:
The mysqldump utility program doesn't print out events.
I regard this as a bug because "mysqldump db1" should
dump everything in the database, and events are in
databases.
I am not asking for options like --events or --skip-events.

How to repeat:
(Assuming use of database db1)

mysql> create event ee on schedule every 1 year do set @a=5;
Query OK, 1 row affected (0.02 sec)

...

/usr/local/mysql/bin/mysqldump db1 --user=root

Examine output, searching for the word "event".
[1 Mar 2006 19:15] Sergei Golubchik
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/3211
[15 Mar 2006 14:37] Paul Dubois
Noted in 5.1.8 changelog.

Added the <option>--events</option> option to
<command>mysqldump</command> to enable events to be included
in the dump output. (Bug #16853)
[2 Apr 2012 12:48] erkan yanar
Isn't the solution "wrong"?
Perter wasn't asking for an option.

It is the same with 5.5.21-log.

#v+
entscheiddich:~ # mysqldump -A  --skip-extended-insert -E | grep eeEEeeEE
INSERT INTO `event` VALUES ('test','eeEEeeEE','set @a=5','root@localhost',NULL,1,'YEAR','2012-04-02 12:41:39','2012-04-02 12:41:39',NULL,'2012-04-02 12:41:39',NULL,'ENABLED','DROP','STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION','',0,'SYSTEM','utf8','utf8_general_ci','utf8_unicode_ci','set @a=5');
/*!50106 DROP EVENT IF EXISTS `eeEEeeEE` */;
/*!50106 CREATE*/ /*!50117 DEFINER=`root`@`localhost`*/ /*!50106 EVENT `eeEEeeEE` ON SCHEDULE EVERY 1 YEAR STARTS '2012-04-02 14:41:39' ON COMPLETION NOT PRESERVE ENABLE DO set @a=5 */ ;;
entscheiddich:~ # mysqldump -A  --skip-extended-insert  | grep eeEEeeEE
#v-
So why is dumping Events not default?
[2 Apr 2012 12:49] erkan yanar
Isn't the solution "wrong"?
Perter wasn't asking for an option.

It is the same with 5.5.21-log.

#v+
entscheiddich:~ # mysqldump -A  --skip-extended-insert -E | grep eeEEeeEE
INSERT INTO `event` VALUES ('test','eeEEeeEE','set @a=5','root@localhost',NULL,1,'YEAR','2012-04-02 12:41:39','2012-04-02 12:41:39',NULL,'2012-04-02 12:41:39',NULL,'ENABLED','DROP','STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION','',0,'SYSTEM','utf8','utf8_general_ci','utf8_unicode_ci','set @a=5');
/*!50106 DROP EVENT IF EXISTS `eeEEeeEE` */;
/*!50106 CREATE*/ /*!50117 DEFINER=`root`@`localhost`*/ /*!50106 EVENT `eeEEeeEE` ON SCHEDULE EVERY 1 YEAR STARTS '2012-04-02 14:41:39' ON COMPLETION NOT PRESERVE ENABLE DO set @a=5 */ ;;
entscheiddich:~ # mysqldump -A  --skip-extended-insert  | grep eeEEeeEE
#v-
So why is dumping Events not default?