Search code examples
mysqlarchive

mysql truncate archive table


I have a table with the archive storage engine and I would like to clear it. Neither delete, nor truncate will work because of the engine definition. But is there any other way than dropping the whole table an recreating it?


Solution

  • See Bug #15558 truncate doesn't clear table on archive storage engine tables

    Basically, the designers wanted it to work that way. The fix to that bug was to make it return an error when you try to use truncate on a table stored with the ARCHIVE storage engine.

    The only workaround is to DROP and the re-CREATE the table.