Announcement

Announcement Module
Collapse
No announcement yet.

Enable keys and table crash

Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Enable keys and table crash

    Hello,

    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;
    UNLOCK TABLES;

    Ok.

    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.

    Any Idee?

    Thanks.

  • #2
    The table's indexes are not fully built, so the table is not usable yet. Wait until the ENABLE KEYS is done.

    Comment

    Working...
    X