mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
fixed joincleunup to avoid double deletin tables, and too earlyfull cleanup in case of EXPLAIN
fixed cleunup of TMP_TABLE_PARAM (BUG#6406) mysql-test/r/subselect.result: primary query with temporary table and subquery with groupping mysql-test/t/subselect.test: primary query with temporary table and subquery with groupping sql/sql_class.h: fixed cleunup of TMP_TABLE_PARAM sql/sql_select.cc: uncacheable test made simplier fixed joincleunup to avoid double deletin tables, and too earlyfull cleanup in case of EXPLAIN
This commit is contained in:
@ -936,7 +936,7 @@ JOIN::optimize()
|
||||
}
|
||||
}
|
||||
|
||||
if (select_lex->master_unit()->uncacheable)
|
||||
if (select_lex->uncacheable)
|
||||
{
|
||||
if (!(tmp_join= (JOIN*)thd->alloc(sizeof(JOIN))))
|
||||
DBUG_RETURN(-1);
|
||||
@ -3833,7 +3833,8 @@ 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->describe);
|
||||
|
||||
if (table)
|
||||
{
|
||||
@ -3862,6 +3863,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