1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

fixed subselect with to temporary tables executing

(now it return correct results. Test was commited before, but it is not pushed,
BUG# is not registered, because bug was introduced after release)
This commit is contained in:
bell@sanja.is.com.ua
2003-07-07 00:45:51 +03:00
parent f9936c61f7
commit bfc70eb9c9
2 changed files with 17 additions and 1 deletions

View File

@ -1137,6 +1137,20 @@ JOIN::exec()
thd->proc_info="Copying to group table";
tmp_error= -1;
if (curr_join != this)
{
if (sum_funcs2)
{
curr_join->sum_funcs= sum_funcs2;
curr_join->sum_funcs_end= sum_funcs_end2;
}
else
{
curr_join->alloc_func_list();
sum_funcs2= curr_join->sum_funcs;
sum_funcs_end2= curr_join->sum_funcs_end;
}
}
if (curr_join->make_sum_func_list(*curr_all_fields, *curr_fields_list,
1) ||
(tmp_error= do_select(curr_join, (List<Item> *) 0, curr_tmp_table,