Bug #13146 mysqldump --triggers doesn't quote names correctly
Submitted: 13 Sep 2005 17:20 Modified: 23 Oct 2005 2:06
Reporter: Sergei Golubchik Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version:5.0 OS:
Assigned to: Bugs System CPU Architecture:Any

[13 Sep 2005 17:20] Sergei Golubchik
Description:
mysqldump takes the trigger and database name from SHOW TRIGGERS, that is, unquoted,
and quote them for dump according to --compatible switch. But it switches sql_mode temporarily to load trigger's body. Thus, table and trigger names may be quoted incorrectly.

How to repeat:
Create "problematic" table and trigger, e.g. CREATE TRIGGER `a b` on `b c` ...
Dump it in --compatible=ansi mode.
Try to load the dump.
[28 Sep 2005 23:16] Patrick Galbraith
If one is to use --compatible switch, how then should the trigger names be quoted in order for the reload to work?
[10 Oct 2005 21:59] 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/internals/30885
[11 Oct 2005 22:54] 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/internals/30940
[12 Oct 2005 18:50] 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/internals/30973
[13 Oct 2005 20:44] 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/internals/31067
[23 Oct 2005 2:06] Paul Dubois
Noted in 5.0.15 changelog.