DB Error: Can't create/write to file '/tmp/#sql_1_0.MYI' (Errcode: 28 - No space left on device) Query: SELECT DISTINCT sf.file_id AS submission_file_id, sf.revision AS submission_revision, af.file_id AS artwork_file_id, af.revision AS artwork_revision, suf.file_id AS supplementary_file_id, suf.revision AS supplementary_revision, p.locale AS submission_locale, sf.*, af.*, suf.* FROM submission_files sf LEFT JOIN submission_artwork_files af ON sf.file_id = af.file_id AND sf.revision = af.revision LEFT JOIN submission_supplementary_files suf ON sf.file_id = suf.file_id AND sf.revision = suf.revision LEFT JOIN submissions as s ON s.submission_id = sf.submission_id LEFT JOIN publications p ON s.current_publication_id = p.publication_id LEFT JOIN submission_files sf2 ON sf.file_id = sf2.file_id AND sf.revision < sf2.revision WHERE sf2.revision IS NULL AND sf.file_id = ? ORDER BY sf.submission_id ASC, sf.file_stage ASC, sf.file_id ASC, sf.revision DESC