If you get an error for some queries of type:
Can't create/write to file '\\sqla3fe_0.ism'.
this means that MySQL can't create a temporary file for the result set in the given temporary directory. (The above error is a typical error message on Windows, and the Unix error message is similar.) The fix is to start mysqld with --tmpdir=path or to add to your option file:
[mysqld] tmpdir=C:/temp
assuming that the c:\\temp directory exists. See Option files.
Check also the error code that you get with perror. One reason may also be a disk full error;
shell> perror 28 Error code 28: No space left on device