Bug #82056 mysqldump with multiple triggers on the same event fails
Submitted: 29 Jun 2016 15:05 Modified: 1 Aug 2016 8:15
Reporter: Hans Kohls Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: mysqldump Command-line Client Severity:S3 (Non-critical)
Version:5.7.13 OS:Linux
Assigned to: CPU Architecture:Any
Tags: mysqldump, trigger

[29 Jun 2016 15:05] Hans Kohls
Description:
I have a database with multiple triggers on the same event. 
The resulting output file contains references using the FOLLOWS and PRECEDES keywords. This generates a cyclic reference which fails on import the second trigger cannot be found when the first trigger is generated. 

 

How to repeat:
Create two triggers on the same event. 
Create backup (either just structure or with data).
Restore from this dump. 
The triggers with the dependence between them won't update. 

Suggested fix:
I've removed the references from the SQL files via script. 
Ideally they are omitted and you retain the feature that Triggers are output in execution order.
[1 Jul 2016 8:15] MySQL Verification Team
Hello Hans Kohls,

Thank you for the report.
I'm not seeing this issue with dummy schema, could you please provide repeatable test case(table/trigger DDL) to reproduce this issue at our end? Please mark it as private after posting here.

If you can provide more information, feel free to add it to this bug and change the status back to 'Open'.

Thank you for your interest in MySQL.

Thanks,
Umesh
[2 Aug 2016 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".