Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-24395

Atomic DROP TRIGGER

    XMLWordPrintable

    Details

      Description

      The purpose of this task is to ensure that DROP TRIGGER is atomic.

      Description of how atomic drop trigger should work:

      Logging of DROP TRIGGER

      • Log to ddl log:
      • db
      • table name
      • trigger name
      • xid /* Used to check if query was already logged to binary log */
      • initial length of the .TRG file
      • query if there is space for it, if not log a zero length query.

      Recovery operations:

      • Delete if exists 'database/trigger_name.TRN~'
        If this file existed, it means that we crashed before the trigger
        was deleted and there is nothing else to do.
      • Get length of TRG file
      • If file length is unchanged, trigger was not dropped. Nothing else to do.
      • Log original query to binary, if it was stored in the ddl log. If it was not stored (long query
        string), log the following query to binary log:
        use `database` ; DROP TRIGGER IF EXISTS `trigger_name` /* generated by ddl log */

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              monty Michael Widenius
              Reporter:
              monty Michael Widenius
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Git Integration