Commit c9df74c8 authored by Georgi Kodinov's avatar Georgi Kodinov

Addendum to the fix for bug #45989

Need to make sure the tmp join doesn't point to the structure already 
freed by the cleanup() for the "base" join, as this can lead to 
double free, because sometimes both tmp_join and join point to the 
same tmp_table_params.copy_field array.
parent 8ceefc7d
...@@ -2319,7 +2319,7 @@ JOIN::destroy() ...@@ -2319,7 +2319,7 @@ JOIN::destroy()
anywhere else (as we need to keep the join is reusable). anywhere else (as we need to keep the join is reusable).
*/ */
tmp_table_param.cleanup(); tmp_table_param.cleanup();
tmp_table_param.copy_field= 0; tmp_table_param.copy_field= tmp_join->tmp_table_param.copy_field= 0;
DBUG_RETURN(tmp_join->destroy()); DBUG_RETURN(tmp_join->destroy());
} }
cond_equal= 0; cond_equal= 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