Commit 0ba3164e 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 23d48b7d
......@@ -452,8 +452,11 @@ static ha_rows find_all_keys(SORTPARAM *param, SQL_SELECT *select,
if (*killed)
{
DBUG_PRINT("info",("Sort killed by user"));
if (!indexfile && !quick_select)
{
(void) file->extra(HA_EXTRA_NO_CACHE);
file->ha_rnd_end();
}
DBUG_RETURN(HA_POS_ERROR); /* purecov: inspected */
}
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