| Bug #81247 | mysqlpump incorrectly dumps triggers | ||
|---|---|---|---|
| Submitted: | 29 Apr 2016 16:06 | Modified: | 2 May 2016 6:43 |
| Reporter: | Saverio Miroddi | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server: mysqlpump Command-line Client | Severity: | S3 (Non-critical) |
| Version: | 5.7.10 | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
[2 May 2016 6:43]
Anandakumar S
Hello Saverio M, Thank you for the report and test case. Verified as described with 5.7.12 build. Thanks, Anand

Description: Mysqlpump does not surround triggers with `DELIMITER` statements when dumping, so that the dump is not valid. This is a (working) sample from mysqldump: DELIMITER ;; /*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER my_trigger AFTER UPDATE ON mytable FOR EACH ROW BEGIN SELECT 1; END */;; DELIMITER ; This is a (not working) sample from mysqlpump: /*!50017 CREATE*/ /*!50003 DEFINER=`root`@`localhost`*/ /*!50017 TRIGGER `mydb`.my_trigger AFTER UPDATE ON mytable FOR EACH ROW BEGIN SELECT 1; END */; How to repeat: Dump any schema with triggers. Suggested fix: Add surrounding `DELIMITER` statements, like mysqldump does.