mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-6785 Wrong result on 2nd execution of PS with aggregate function, FROM SQ or MERGE view
a different fix for view.test --ps-protocol crash (revert the old fix that has caused a regression)
This commit is contained in:
@ -465,8 +465,6 @@ bool mysql_derived_merge(THD *thd, LEX *lex, TABLE_LIST *derived)
|
||||
}
|
||||
}
|
||||
|
||||
if (!derived->merged_for_insert)
|
||||
dt_select->first_cond_optimization= FALSE; // consider it optimized
|
||||
exit_merge:
|
||||
if (arena)
|
||||
thd->restore_active_arena(arena, &backup);
|
||||
|
@ -633,7 +633,7 @@ inline int setup_without_group(THD *thd, Item **ref_pointer_array,
|
||||
res= setup_conds(thd, tables, leaves, conds);
|
||||
if (thd->lex->current_select->first_cond_optimization)
|
||||
{
|
||||
if (!res && *conds)
|
||||
if (!res && *conds && ! thd->lex->current_select->merged_into)
|
||||
(*reserved)= (*conds)->exists2in_reserved_items();
|
||||
else
|
||||
(*reserved)= 0;
|
||||
|
Reference in New Issue
Block a user