title: Incorrect key file with MySQL
body: <p>I'm having a problem with a InnoDB (table was initally MyISAM, but converted it to InndoB awhile ago) table; I am trying to run this query:</p>
  
  <pre><code>SELECT 
     posts.id,
     posts.post_title
  FROM
     rss_posts AS posts
     INNER JOIN rss_feeds AS feeds ON posts.blog_id=feeds.id
  WHERE
     feeds.blog_language=1
  ORDER BY
     posts.post_date_db DESC
  LIMIT
     10;
  </code></pre>
  
  <p>I get this error:</p>
  
  <pre><code>Query : SELECT   posts.id,posts.post_title  FROM   rss_posts AS posts   INNER JOIN vw_rss_feeds AS feeds ON posts.blog_id=feeds.id  WHER...
  Error Code : 126
  Incorrect key file for table '/tmp/#sql_7375_0.MYI'; try to repair it
  </code></pre>
  
  <p>I cannot run a repair on the tables involved; however I have ran a CHECK on both tables &amp; they appear fine. I have also done an OPTIMIZE on both tables &amp; ALSO rebuilt the tables by doing the below..</p>
  
  <pre><code>INSERT INTO new_table SELECT * FROM old_table;
  </code></pre>
  
  <p>I then renamed the new table to the old table name..... but I am STILL having that problem. </p>
  
  <p>To try &amp; figure out what table was causing it I removed the code in the query referencing the "rss_feeds" table.... so now the query looks like this.. </p>
  
  <pre><code>SELECT 
     posts.id,
     posts.post_title
  FROM
     rss_posts AS posts
  ORDER BY
     posts.post_date_db DESC
  LIMIT
     10;
  </code></pre>
  
  <p>That worked.</p>
  
  <p>So the problem is something with the rss_feeds table.</p>
  
  <p>So then I figured I would convert the table back to MyISAM &amp; run a repair &amp; then convert back to InnoDB..... this worked temporarily, it was back to normal.... then it broke again..... repaired it again, broke again.... now the repair doesn't seem to work at all.</p>
  
  <p>Now, I know, I know...... I have searched for this problem on Google already...... I noticed that the MAJORITY of the time the problem is there us not enough space in the MySQL temp directory.... but I already got the host to change the temp dir to something with a LOT more space &amp; the problem still remains.</p>
  
  <p>I'm thinking the HOST is to blame &amp; it STILL is a problem with the temp dir; why? Because after I got it working again I started adding data to the rss_posts table again &amp; hence the JOIN would get LARGER &amp; MySQL would again run out of space.... what do you think?</p>