summaryrefslogtreecommitdiff
path: root/sql/sql_derived.cc
diff options
context:
space:
mode:
authorSinisa@sinisa.nasamreza.org <>2003-08-06 18:59:26 +0300
committerSinisa@sinisa.nasamreza.org <>2003-08-06 18:59:26 +0300
commit1d2a7cadaeb687db69f5e19b83c0b9cacb9f7664 (patch)
treecfd699e5b375e48d92e731e8b4212c3f415699d2 /sql/sql_derived.cc
parenta4483aaa1d50d12ba1119e012939dc4cc98f8ca7 (diff)
parent3c99eb433cde2bbe2474e4a64b70bf3e0fcfa3c3 (diff)
downloadmariadb-git-1d2a7cadaeb687db69f5e19b83c0b9cacb9f7664.tar.gz
merge
Diffstat (limited to 'sql/sql_derived.cc')
-rw-r--r--sql/sql_derived.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc
index 9ed26bc4062..81439a19918 100644
--- a/sql/sql_derived.cc
+++ b/sql/sql_derived.cc
@@ -122,6 +122,16 @@ int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit,
res= -1;
goto exit;
}
+
+ /*
+ This is done in order to redo all field optimisations when any of the
+ involved tables is used in the outer query
+ */
+ if (tables)
+ {
+ for (TABLE_LIST *cursor= tables; cursor; cursor= cursor->next)
+ cursor->table->clear_query_id= 1;
+ }
item_list= select_cursor->item_list;
select_cursor->with_wild= 0;