You might get a MySQL error like this:

ERROR 126 (HY000) at line 3: Incorrect key file for table '/var/tmp/#sql3f5_1b6c4e_1.MYI'; try to repair it

This probably means that you ran out of disk space on /var/tmp while MySQL was trying to create a temporary table.

The generation of temporary tables can be caused by derived tables (like a subselect) or filesort kicking in when you use ORDER BY.

What you can do to fix this:

I wrote this up in May 2010, it was applicable to MySQL 5.1.