1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

now we create temporary join for all queries with subqueries to make correct cleunup of tables and avoid too early unlock (BUG#6841)

This commit is contained in:
bell@sanja.is.com.ua
2004-11-30 21:41:12 +02:00
parent d5b21d03a5
commit f20e7a82b7
5 changed files with 14 additions and 2 deletions

View File

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