mysqldump incorrect drop trigger
Bug #1504202 reported by
Alexander
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
MySQL Server |
Unknown
|
Unknown
|
||||
Percona Server moved to https://jira.percona.com/projects/PS | Status tracked in 5.7 | |||||
5.1 |
Invalid
|
Undecided
|
Unassigned | |||
5.5 |
Invalid
|
Undecided
|
Unassigned | |||
5.6 |
Triaged
|
Medium
|
Unassigned | |||
5.7 |
Triaged
|
Medium
|
Unassigned |
Bug Description
mysql is allow to use trigger names that contains dots.
But when mysqldump generate sql file that contains triggers with dots it add something like this:
/*!50032 DROP TRIGGER IF EXISTS trigger.with.dots */;
It is incorrect sql statement. Name with dots must be in quotes:
/*!50032 DROP TRIGGER IF EXISTS `trigger.with.dots` */;
To post a comment you must log in.
This is easy to confirm. Just create trigger like this in some database:
create database tri;
use tri;
create table t1(id int);
create trigger `trigger.with.dots` before insert on t1 for each row set @a=1;
and then dump with --add-drop-trigger option:
mysqldump --triggers --no-data --no-create-info --add-drop-trigger -uroot -proot -P3314 tri
to see these:
/*!50032 DROP TRIGGER IF EXISTS trigger.with.dots */; `root`@ `localhost` */ /*!50003 trigger `trigger.with.dots` before insert on t1 for each row set @a=1 */;;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=
...