|
I talked with Sergei and we agreed that create or replace should work even if the original trigger was for another table.
This is best to be done in 10.6 where we can use the atomic ddl code to make this atomic.
In case of 'create or replace trigger' for a trigger that was originally for another table,
the code should work as follows:
- Take a ddl lock for the trigger name (Already done in 10.5 as part of
MDEV-25606).
- Execute 'drop trigger' for the original trigger. However, do not close the ddl log.
- Execute create trigger for the new table.
- If something goes wrong, use the ddl_log_revert() to restore the original trigger.
|