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