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

5.3 -> 5.5 Merge

This commit is contained in:
unknown
2013-06-17 20:33:36 +03:00
5 changed files with 57 additions and 1 deletions

View File

@ -87,7 +87,16 @@ mysql_handle_derived(LEX *lex, uint phases)
sl && !res;
sl= sl->next_select_in_list())
{
for (TABLE_LIST *cursor= sl->get_table_list();
TABLE_LIST *cursor= sl->get_table_list();
/*
DT_MERGE_FOR_INSERT is not needed for views/derived tables inside
subqueries. Views and derived tables of subqueries should be
processed normally.
*/
if (phases == DT_MERGE_FOR_INSERT &&
cursor && cursor->top_table()->select_lex != &lex->select_lex)
continue;
for (;
cursor && !res;
cursor= cursor->next_local)
{