summaryrefslogtreecommitdiff
path: root/sql/sql_derived.cc
diff options
context:
space:
mode:
authorunknown <Sinisa@sinisa.nasamreza.org>2003-05-31 18:31:57 +0300
committerunknown <Sinisa@sinisa.nasamreza.org>2003-05-31 18:31:57 +0300
commitc47c56452680e1bbdaa9d8ed4203470cf7f02c56 (patch)
tree31770b2965c9dd5f4b6041695d572ccc894b39ce /sql/sql_derived.cc
parent4637832fa19b2866929c1e5cb7c9dd0a40db15c9 (diff)
downloadmariadb-git-c47c56452680e1bbdaa9d8ed4203470cf7f02c56.tar.gz
Fix for the optimiser problem caused by the fact that with derived
tables one (or more tables) is opened / closed twice.
Diffstat (limited to 'sql/sql_derived.cc')
-rw-r--r--sql/sql_derived.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc
index 7f555f37d40..66b8048996f 100644
--- a/sql/sql_derived.cc
+++ b/sql/sql_derived.cc
@@ -219,6 +219,8 @@ int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit,
/* Add new temporary table to list of open derived tables */
table->next= thd->derived_tables;
thd->derived_tables= table;
+ thd->query_id++;
+ query_id++;
}
exit: