A query of mine seems to be creating temp files in the tmp dir of my server. I thought that when the query had finished with them, that MySQL would delete them but it seems not to be so.

Is there a setup configuration that I need to change so that they will be deleted or is this something I need to do in my scripting or with a cron job?