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

DELETE HISTORY from partitioned table deserves a specific error message

    XMLWordPrintable

Details

    Description

      DELETE HISTORY from a system-version-partitioned table is not currently allowed, and it fails with the most generic ER_NOT_ALLOWED_COMMAND:

      MariaDB [test]> create or replace table t1 (i int) with system versioning partition by system_time interval 1 day (partition p1 history, partition pn current);
      Query OK, 0 rows affected (0.45 sec)
       
      MariaDB [test]> delete history from t1;
      ERROR 1148 (42000): The used command is not allowed with this MariaDB version
      

      I think it's user-unfriendly, table creation and the attempt to truncate the history can be long time apart, and it's not easy to understand the relation. Besides, it's not accurate, because the command itself is allowed with the MariaDB version, it's the circumstances that prohibit it from being executed. All in all, I think a more specific error would be better here.

      Attachments

        Activity

          People

            kevg Eugene Kosov (Inactive)
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

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