• Monty's avatar
    MDEV-25606: Concurrent CREATE TRIGGER statements mix up in binlog and break replication · 621501f3
    Monty authored
    The bug is that we don't have a a lock on the trigger name, so it is
    possible for two threads to try to create the same trigger at the same
    time and both thinks that they have succeed.
    Same thing can happen with drop trigger or a combinations of create and
    drop trigger.
    
    Fixed by adding a mdl lock for the trigger name for the duration of the
    create/drop.
    
    Patch tested by Elena
    621501f3
sql_trigger.cc 80.4 KB