Commit bcea7d60 authored by unknown's avatar unknown

A fix (bug #8799: Killed filesorts can fail inited==RND assertion in ha_rnd_end).


sql/filesort.cc:
  A fix (bug #8799: Killed filesorts can fail inited==RND assertion in ha_rnd_end).              
  Should call ha_rnd_end() only if ha_rnd_init() was called.
parent 4bf10eac
...@@ -452,8 +452,11 @@ static ha_rows find_all_keys(SORTPARAM *param, SQL_SELECT *select, ...@@ -452,8 +452,11 @@ static ha_rows find_all_keys(SORTPARAM *param, SQL_SELECT *select,
if (*killed) if (*killed)
{ {
DBUG_PRINT("info",("Sort killed by user")); DBUG_PRINT("info",("Sort killed by user"));
(void) file->extra(HA_EXTRA_NO_CACHE); if (!indexfile && !quick_select)
file->ha_rnd_end(); {
(void) file->extra(HA_EXTRA_NO_CACHE);
file->ha_rnd_end();
}
DBUG_RETURN(HA_POS_ERROR); /* purecov: inspected */ DBUG_RETURN(HA_POS_ERROR); /* purecov: inspected */
} }
if (error == 0) if (error == 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment