[MDEV-6112] multiple triggers per table Created: 2014-04-15 Updated: 2018-08-31 Resolved: 2016-10-04 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Triggers |
| Fix Version/s: | 10.2.3 |
| Type: | Task | Priority: | Major |
| Reporter: | Sergei Golubchik | Assignee: | Michael Widenius |
| Resolution: | Fixed | Votes: | 2 |
| Labels: | Compatibility | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||
| Epic Link: | Oracle Compatibility | ||||||||||||||||||||||||||||||||||||||||
| Sprint: | 10.2.2-3, 10.2.2-2, 10.2.2-4 | ||||||||||||||||||||||||||||||||||||||||
| Description |
|
Many triggers for the same event per table (e.g. many BEFORE DELETE triggerts). Looked at the MySQL 5.7 implementation. Too complex and too many not needed changed and moving of things to different files that make it very hard to follow code changes over time. Will do this with new code, but will take test cases from MySQL 5.7 New functionality:
|
| Comments |
| Comment by Federico Razzoli [ 2016-09-20 ] |
|
Can this be disabled? Multiple triggers of the same type can be useful, but can also be chaotic and hard to debug... |
| Comment by Michael Widenius [ 2016-09-27 ] |
|
ready for review and testing |
| Comment by Michael Widenius [ 2016-09-27 ] |
|
As it's completely optional to add a trigger for table, I don't see any reason to disable this. |
| Comment by Federico Razzoli [ 2016-09-27 ] |
|
Almost every feature can be limited in some way, the strangest example is sql_safe_updates. |
| Comment by Michael Widenius [ 2016-09-28 ] |
|
Another reason for not adding an option for this is that multiple triggers per table is standard ANSI SQL feature. Optionally disabling all features in SQL that may be problematic for some users is task independent of this one. For example, I think a lot of people would find it useful if DROP TABLE was disabled after they have dropped an important table |
| Comment by Michael Widenius [ 2016-10-04 ] |
|
Feature pushed into 10.2 |