简体   繁体   中英

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?

另一种解决方法是将其更改为BLACKHOLE表,然后将其更改回来。

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM