1
0
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:
Sergei Golubchik
2014-11-18 22:25:41 +01:00
parent 303eec5774
commit a8bd285f7c
4 changed files with 30 additions and 3 deletions

View File

@ -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);

View File

@ -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;