mysql truncate archive table Code Answer

Hello Developer, Hope you guys are doing great. Today at Tutorial Guruji Official website, we are sharing the answer of mysql truncate archive table without wasting too much if your time.

The question is published on by Tutorial Guruji team.

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?

Answer

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.

We are here to answer your question about mysql truncate archive table - If you find the proper solution, please don't forgot to share this with your team members.

Related Posts

Tutorial Guruji