Tuesday, May 10, 2011

mysql error - #144 - is marked as crashed and last (automatic?) repair failed

It turned out that this cannot be solved by a bug fix.

The repair code modifies the index file while it is going. If it is interrupted by a
kill, it leaves behind a corrupted table.

This could in theory be solved by backing up the index file and work on a new file
instead. But this is a major change in behaviour, which we don't intend to do at the
moment.

I am deeply sorry that I cannot do better but quote the fine reference manual:
"Warning: Killing a REPAIR TABLE or OPTIMIZE TABLE operation on a MyISAM  table results
in a table that is corrupted and unusable. Any reads or writes to such a table fail until
you optimize or repair it again (without interruption)."
(http://dev.mysql.com/doc/refman/5.1/en/kill.html)
 
Warning
Killing a REPAIR TABLE or OPTIMIZE TABLE operation on a MyISAM table results in a table that is corrupted and unusable.
 
 
repair table 'tablename'; 
#1064 - 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 ''tablename'' at line 1
 
i was running it from outside the db
repair table 'wp_posts';
#1064 - 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 ''wp_posts'' at line 1
 
 
REPAIR TABLE `wp_posts`  
 
 

1 comment:

  1. Im having a problem with my database. can you help me?

    I always have this result "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"

    what does it mean?

    ReplyDelete