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

Allow ALGORITHM=NOCOPY for ADD CONSTRAINT

    XMLWordPrintable

    Details

      Description

      The ADD FOREIGN KEY and ADD CHECK constraints currently require the table to be rebuilt with ALGORITHM=COPY.

      We could support these operations instantly if the user specified a WITHOUT VALIDATION clause. We currently do support instant ADD FOREIGN KEY after SET foreign_key_checks=0, but there is no such mechanism for ADD CONSTRAINT CHECK.

      When validation is not suppressed, we should only scan the table and validate the added constraints. There is no need to write any data to the table. For LOCK=NONE operation, we may need to ‘subscribe’ to concurrent modifications somehow.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              kevg Eugene Kosov
              Reporter:
              marko Marko Mäkelä
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated: