mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge with 4.1
This commit is contained in:
@ -1050,7 +1050,7 @@ JOIN::optimize()
|
||||
}
|
||||
}
|
||||
|
||||
if (select_lex->master_unit()->uncacheable)
|
||||
if (thd->lex->subqueries)
|
||||
{
|
||||
if (!(tmp_join= (JOIN*)thd->alloc(sizeof(JOIN))))
|
||||
DBUG_RETURN(-1);
|
||||
@ -5702,7 +5702,9 @@ JOIN::join_free(bool full)
|
||||
JOIN_TAB *tab,*end;
|
||||
DBUG_ENTER("JOIN::join_free");
|
||||
|
||||
full= full || !select_lex->uncacheable;
|
||||
full= full || (!select_lex->uncacheable &&
|
||||
!thd->lex->subqueries &&
|
||||
!thd->lex->describe); // do not cleanup too early on EXPLAIN
|
||||
|
||||
if (table)
|
||||
{
|
||||
@ -5731,6 +5733,7 @@ JOIN::join_free(bool full)
|
||||
for (tab= join_tab, end= tab+tables; tab != end; tab++)
|
||||
tab->cleanup();
|
||||
table= 0;
|
||||
tables= 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user