1
0
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:
monty@mysql.com
2004-12-06 11:38:56 +02:00
107 changed files with 24790 additions and 337 deletions

View File

@ -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
{