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.
This commit is contained in:
Georgi Kodinov 2010-02-04 18:51:55 +02:00
parent 3aa696bf9b
commit 3c9bfe8334

View File

@ -2319,7 +2319,7 @@ JOIN::destroy()
anywhere else (as we need to keep the join is reusable).
*/
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());
}
cond_equal= 0;