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

LP:997460 - truncate table on partitioned Aria table fails with ER_ILLEGAL_HA

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      Hi,
      I am running Ver 5.5.23-MariaDB-log for Linux on x86_64 (MariaDB Server).

      My application uses lots of the "truncate table" command on tables located in the aria storage engine.

      Every hour I run a series of "truncate table" commands on the tables and am getting these errors:

      Table storage engine for 'TABLE' doesn't have this option

      This happens about 50% of the time when truncate is executed. When I run the command directly on the db, via the mysql client, I don't see the issue. Additionally I don't see any errors in the mysqld log.

      This did not occur on previous versions of mariadb / aria engine, I was actually having other issues that I didn't log a bug for, but they seem to have subsided in favor of this issue in this release.

      Please let me know what I can give you to better diagnose the error. It is occurring all the time in my env so I shouldn't have a problem giving you any data that you need.

      thanks.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            elenst Elena Stepanova added a comment -

            Re: truncate table on aria storage engine fails inconsistently
            Hi Scott,

            Thank you, the fact that the table is partitioned was the missing bit of info (although, I could have guessed).

            Show
            elenst Elena Stepanova added a comment - Re: truncate table on aria storage engine fails inconsistently Hi Scott, Thank you, the fact that the table is partitioned was the missing bit of info (although, I could have guessed).
            Hide
            elenst Elena Stepanova added a comment -

            Re: truncate table on aria storage engine fails inconsistently

            1. Test case:

            CREATE TABLE t ( i INT )
            ENGINE=Aria
            PARTITION BY HASH PARTITIONS 2;
            SET AUTOCOMMIT = 0;
            TRUNCATE TABLE t;

            1. 'TRUNCATE TABLE t' failed: 1031: Table storage engine for 't' doesn't have this option
            Show
            elenst Elena Stepanova added a comment - Re: truncate table on aria storage engine fails inconsistently Test case: CREATE TABLE t ( i INT ) ENGINE=Aria PARTITION BY HASH PARTITIONS 2; SET AUTOCOMMIT = 0; TRUNCATE TABLE t; 'TRUNCATE TABLE t' failed: 1031: Table storage engine for 't' doesn't have this option
            Hide
            elenst Elena Stepanova added a comment -

            Re: truncate table on partitioned Aria table fails with ER_ILLEGAL_HA
            Also filed in JIRA as https://mariadb.atlassian.net/browse/MDEV-276

            Show
            elenst Elena Stepanova added a comment - Re: truncate table on partitioned Aria table fails with ER_ILLEGAL_HA Also filed in JIRA as https://mariadb.atlassian.net/browse/MDEV-276
            Hide
            monty Michael Widenius added a comment -

            Re: truncate table on partitioned Aria table fails with ER_ILLEGAL_HA
            The problem was that in MySQL 5.5 the old code for handling truncate by delete-row-one-by-one was removed()
            This was used in Aria for the case when one didn't have auto-commit and we wanted to be able to rollback a TRUNCATE.

            Have now fixed this by forcing the Aria internal truncate call to do an explicit commit.
            The disadvantage is that we can't rollback TRUNCATE anymore in Aria.

            Show
            monty Michael Widenius added a comment - Re: truncate table on partitioned Aria table fails with ER_ILLEGAL_HA The problem was that in MySQL 5.5 the old code for handling truncate by delete-row-one-by-one was removed() This was used in Aria for the case when one didn't have auto-commit and we wanted to be able to rollback a TRUNCATE. Have now fixed this by forcing the Aria internal truncate call to do an explicit commit. The disadvantage is that we can't rollback TRUNCATE anymore in Aria.
            Hide
            ratzpo Rasmus Johansson added a comment -

            Launchpad bug id: 997460

            Show
            ratzpo Rasmus Johansson added a comment - Launchpad bug id: 997460

              People

              • Assignee:
                monty Michael Widenius
                Reporter:
                scottfeldstein Scott Feldstein
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: