mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge branch 'bb-10.1-merge' into 10.1
This commit is contained in:
@ -465,6 +465,8 @@ 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);
|
||||
@ -614,6 +616,7 @@ bool mysql_derived_prepare(THD *thd, LEX *lex, TABLE_LIST *derived)
|
||||
SELECT_LEX_UNIT *unit= derived->get_unit();
|
||||
DBUG_ENTER("mysql_derived_prepare");
|
||||
bool res= FALSE;
|
||||
DBUG_PRINT("enter", ("unit 0x%lx", (ulong) unit));
|
||||
|
||||
// Skip already prepared views/DT
|
||||
if (!unit || unit->prepared ||
|
||||
@ -623,9 +626,6 @@ bool mysql_derived_prepare(THD *thd, LEX *lex, TABLE_LIST *derived)
|
||||
thd->lex->sql_command == SQLCOM_DELETE_MULTI))))
|
||||
DBUG_RETURN(FALSE);
|
||||
|
||||
Query_arena *arena, backup;
|
||||
arena= thd->activate_stmt_arena_if_needed(&backup);
|
||||
|
||||
SELECT_LEX *first_select= unit->first_select();
|
||||
|
||||
/* prevent name resolving out of derived table */
|
||||
@ -743,8 +743,6 @@ exit:
|
||||
if (derived->outer_join)
|
||||
table->maybe_null= 1;
|
||||
}
|
||||
if (arena)
|
||||
thd->restore_active_arena(arena, &backup);
|
||||
DBUG_RETURN(res);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user