summaryrefslogtreecommitdiff
path: root/sql/sql_select.cc
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2004-11-30 21:41:12 +0200
committerunknown <bell@sanja.is.com.ua>2004-11-30 21:41:12 +0200
commita49025d2c86adefcb61517ff75434479b75b8d02 (patch)
tree35c1ff6c8cdf8dfb42fcc80193de22685fca23ba /sql/sql_select.cc
parentdcd6e3d070abf96d9d2bf69bd42ff668059e8e83 (diff)
downloadmariadb-git-a49025d2c86adefcb61517ff75434479b75b8d02.tar.gz
now we create temporary join for all queries with subqueries to make correct cleunup of tables and avoid too early unlock (BUG#6841)
mysql-test/t/subselect_innodb.test: possible early unlock sql/sql_lex.cc: subqueries presence flag sql/sql_lex.h: subqueries presence flag sql/sql_parse.cc: subqueries presence flag sql/sql_select.cc: removed some too optimistic optimisation, now we create temporary join for all queries with subqueries to make correct cleunup of tables and avoid too early unlock
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r--sql/sql_select.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 5809bd2b7be..ec7ea9091be 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -936,7 +936,7 @@ JOIN::optimize()
}
}
- if (select_lex->uncacheable)
+ if (thd->lex->subqueries)
{
if (!(tmp_join= (JOIN*)thd->alloc(sizeof(JOIN))))
DBUG_RETURN(-1);
@@ -3834,6 +3834,7 @@ JOIN::join_free(bool full)
DBUG_ENTER("JOIN::join_free");
full= full || (!select_lex->uncacheable &&
+ !thd->lex->subqueries &&
!thd->lex->describe); // do not cleanup too early on EXPLAIN
if (table)