1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

A fix and a test case for Bug#12736 "Server crash during a select".

The bug was in JOIN::join_free which was wrongly determining that
all joins have been already executed and therefore all used tables
can be closed.
This commit is contained in:
konstantin@mysql.com
2005-10-13 11:53:00 +04:00
parent 2c7505b263
commit b2ff38202d
8 changed files with 151 additions and 14 deletions

View File

@ -720,3 +720,17 @@ bool st_select_lex::cleanup()
DBUG_RETURN(error);
}
void st_select_lex::cleanup_all_joins(bool full)
{
SELECT_LEX_UNIT *unit;
SELECT_LEX *sl;
if (join)
join->cleanup(full);
for (unit= first_inner_unit(); unit; unit= unit->next_unit())
for (sl= unit->first_select(); sl; sl= sl->next_select())
sl->cleanup_all_joins(full);
}