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:
@ -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)
|
||||
|
Reference in New Issue
Block a user