Bug #77856 | CREATE TRIGGER incorrect delimiter parsing inside of comments | ||
---|---|---|---|
Submitted: | 28 Jul 2015 6:33 | Modified: | 28 Jul 2015 7:57 |
Reporter: | Tyler Mitchell | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: Command-line Clients | Severity: | S3 (Non-critical) |
Version: | 5.6.26, 5.7.9, 5.5.46 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | trigger semicolon parsing mysqldump |
[28 Jul 2015 6:33]
Tyler Mitchell
[28 Jul 2015 7:57]
MySQL Verification Team
Hello Tyler Mitchell, Thank you for the report and test case. Observed this with 5.6.26, and 5.7.9 builds. Thanks, Umesh
[3 Mar 2016 19:23]
cindy .
This can be cleaned after the fact with: sed -i "s|END; \*\/|END \*\/|g" dumpfile.sql
[11 Apr 2019 19:25]
Peter Mc Aulay
Still present in 5.7.22-enterprise-commercial-advanced: mysql> show create trigger ss_insert_phpunit_appraisal \G *************************** 1. row *************************** Trigger: ss_insert_phpunit_appraisal sql_mode: ANSI_QUOTES,STRICT_ALL_TABLES SQL Original Statement: CREATE DEFINER="apache"@"xxxx.xxx" TRIGGER ss_insert_phpunit_appraisal AFTER INSERT ON phpunit_appraisal FOR EACH ROW UPDATE ss_tables_phpunit_ SET modifications = 1 WHERE tablename = 'phpunit_appraisal' AND modifications = 0 ; character_set_client: utf8mb4 collation_connection: utf8mb4_general_ci Database Collation: utf8mb4_unicode_ci Created: 2018-11-07 16:07:50.80 1 row in set (0.00 sec) When dumped, the result is this: DELIMITER ;; /*!50003 CREATE*/ /*!50017 DEFINER="apache"@"xxxx.xxx"*/ /*!50003 TRIGGER ss_insert_phpunit_appraisal AFTER INSERT ON phpunit_appraisal FOR EACH ROW UPDATE ss_tables_phpunit_ SET modifications = 1 WHERE tablename = 'phpunit_appraisal' AND modifications = 0 ; */;; Which is invalid and needs to be fed to sed 's/^\;//g' before it will load.