ERROR 2398 UNKNOWN_ERR_CODE on truncate table

on memsql 7.0 in our cluster-in-a-box setup, when I try to run a

TRUNCATE TABLE errored_table

I get the following error:

ERROR 2398 UNKNOWN_ERR_CODE: Leaf Error (127.0.0.1:3307): Failed to ALTER table errored_table: The previous ALTER on the table failed and has not been cleaned up by the background merger. Please run "OPTIMIZE TABLE [table_name] FIX_ALTER" and try again.

Running OPTIMIZE TABLE errored_table doesn’t do anything, and running it with the FIX_ALTER fails with the following error:

ERROR 1064 ER_PARSE_ERROR: Leaf Error (127.0.0.1:3307): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OPTIMIZE TABLE database_1.errored_table FIX_ALTER' at line 1

How can this be fixed?

1 Like

I have experienced the same :frowning: Any idea?

Same here, any idea?

We have updated the memsql-ciab container to 7.0.15, and the issue is still the same.
It seems it is stuck in building indexes as the SHOW COLUMNAR MERGE STATUS FOR table command shows it:

There is not any progress or process running in the processlist which would indicate that anything is happening.

1 Like

This sounds like what is described in this support bulletin: Alters of secondary indexes on columnstore tables impacting MemSQL 7.0 versions up to and including 7.0.14

The only fix is to upgrade to 7.0.15 and then drop the table or database (after copying the data to another table).