summaryrefslogtreecommitdiff
path: root/sql/sql_derived.cc
diff options
context:
space:
mode:
authorunknown <Sinisa@sinisa.nasamreza.org>2003-08-06 18:59:26 +0300
committerunknown <Sinisa@sinisa.nasamreza.org>2003-08-06 18:59:26 +0300
commit6496a0dd14dd15be215cfca5172bad1935302c24 (patch)
treecfd699e5b375e48d92e731e8b4212c3f415699d2 /sql/sql_derived.cc
parente4477bcacf78741f5c1116cbba2174396f413b5e (diff)
parentb5e85696741e02ab33432bdec254edd802839fa1 (diff)
downloadmariadb-git-6496a0dd14dd15be215cfca5172bad1935302c24.tar.gz
merge
mysql-test/r/innodb.result: Auto merged sql/sql_base.cc: Auto merged sql/sql_derived.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_union.cc: Auto merged
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;