Fix by calling ha_release_temporary_latches() before ::filesort().
Attach a file by drag & drop or click to upload