I keep seeing this pop up in my logs every few hours.

Trying to get property of non-object -- Incorrect key file for table '/tmp/#sql_ad2_2.MYI'; try to repair it

I ran mysqlcheck on all tables, but I still get it. Is there anything else I can do?

link|improve this question

60% accept rate
feedback

1 Answer

up vote 0 down vote accepted

the key file error you're getting is on a temporary table or a table being rebuilt. You might check your processlist to see if you have some very large query running that is trying to do a create temporary table select * from something;

Since it is a /tmp table, it should be removed when the thread that created it terminates. When the logs pop up, is it the same filename? or a different filename? Is it possible that /tmp is not set chmod 1777 ? or are there files there that mysql created that don't have the correct uid:gid?

link|improve this answer
I suspected it was a temp table, but I just couldn't figure out why. /tmp/ is 777. Is it possible this is an innodb bug? – Ian Jun 24 '10 at 2:59
.MYI is a MyISAM file. I'm wondering if you have something running mysqlcheck on a cron job, and it just happens to hit an old tmp file that was abandoned. What is the date on that file, is it recent? – karmawhore Jun 24 '10 at 3:34
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.