I don\'t come here for help often but I am pretty frustrated by this and I am hoping someone has encountered it before.
Whenever I try to fetch records from a table
You may find running "ANALYZE TABLE " helps.
We had this problem suddenly appear on a large table (~100M rows) and MySQL tried to use /tmp to write a temporary table of over 1GB, which failed as /tmp was limited to ~600M.
It turned out that the statistics for the InnoDB table were rather stale. After running "ANALYZE TABLE ...", the statistics were updated and the problem cleared. With the more accurate statistics, MySQL was able to optimize the query correctly and the large tmp file was no longer required.
We now run "mysqlcheck -Aa" periodically to keep all table statistics fresh.