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

Allow TRUNCATE TABLE to execute if table is referenced via FK by an empty table

    XMLWordPrintable

Details

    Description

      Since the first days of InnoDB, it is impossible to execute a TRUNCATE TABLE if the table in question is referenced by another table via foreign keys.

      While I understand that TRUNCATE TABLE is implemented as DDL, I think it could be safe and also very useful to allow the operation to proceed when the table which references the one to be truncated is empty, instead of forcing users to set FOREIGN_KEY_CHECKS=0.

      Attachments

        Activity

          People

            Unassigned Unassigned
            rpizzi Rick Pizzi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.