mysql - "Table is marked as crashed" - fixed by CHECK TABLE ...? -


i did "check table mytable" , there 2 rows msg_text: "table marked crashed" "ok"

i took 10 mins review how 'myisamchk' works, ran check table again verify error, surprise error no longer there.

i reviewed check table documentation , see sentence ..

"for myisam tables, key statistics updated well."

the table "myisam".

is possible ... - non-updated stats causing "...crashed" error - , updating stats via check table resolved error?

thanks

it works this...

while mysqld running, has flag set in index (.myi file) using. index updates written .myi file, no sense of urgency, since cached in "key_buffer".

when mysqld terminates un-gracefully (eg, because of power failure), mysqld has no chance clear flag. after restarting, mysqld sees flag , says "oh, panic; index may corrupted". then, have come in , take action clear flag and, if necessary, fix corruption using repair table or equivalent myisamchk suitable arguments.

often, index not corrupt, , check/repair not needed. mysql can't sure. hence, alarming message.

it possible have setting myisam tables checked , repaired during startup. see myisam_recover_options set other off.

if switch innodb, can forget stuff.


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -