1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Merge remote-tracking branch '5.5' into 10.0

This commit is contained in:
Vicențiu Ciorbaru
2018-01-24 12:29:31 +02:00
153 changed files with 1983 additions and 676 deletions

View File

@ -367,7 +367,11 @@ bool mysql_derived_merge(THD *thd, LEX *lex, TABLE_LIST *derived)
derived->get_unit()));
if (derived->merged)
{
DBUG_PRINT("info", ("Irreversibly merged: exit"));
DBUG_RETURN(FALSE);
}
if (dt_select->uncacheable & UNCACHEABLE_RAND)
{
@ -678,6 +682,17 @@ bool mysql_derived_prepare(THD *thd, LEX *lex, TABLE_LIST *derived)
unit->derived= derived;
/*
Above cascade call of prepare is important for PS protocol, but after it
is called we can check if we really need prepare for this derived
*/
if (derived->merged)
{
DBUG_PRINT("info", ("Irreversibly merged: exit"));
DBUG_RETURN(FALSE);
}
derived->fill_me= FALSE;
if (!(derived->derived_result= new select_union))
@ -807,6 +822,11 @@ bool mysql_derived_optimize(THD *thd, LEX *lex, TABLE_LIST *derived)
DBUG_PRINT("enter", ("Alias: '%s' Unit: %p",
(derived->alias ? derived->alias : "<NULL>"),
derived->get_unit()));
if (derived->merged)
{
DBUG_PRINT("info", ("Irreversibly merged: exit"));
DBUG_RETURN(FALSE);
}
if (unit->optimized)
DBUG_RETURN(FALSE);