I have a problem on my MySQL server. I have a big table (3G), with multiple index, so I want daily delete some data for this table.
My table is name ‘T1’. So, my process is :
RENAME TABLE T1 TO oldT1;
CREATE TABLE T1 LIKE oldT1;
LOCK TABLE T1 write, oldT1 read;
ALTER TABLE T1 DISABLE KEYS;
INSERT INTO T1 SELECT * FROM T2 WHERE
mydate >= ‘2009-02-01’;
ALTER TABLE T1 ENABLE KEYS;
But when i do a “show status” when the query is making “ALTER TABLE T1 ENABLE KEYS;”, my log says :
Table ‘./test/T1’ is marked as crashed and should be repaired
The probleme is only view when MySQL is enabling keys.
T1 is a big table, but there is the same probleme with other table. When MySQL is querying a table Tx during an “enabling keys” on Tx, then the table is marked as crashed.