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

Bug#57704 Cleanup code dies with void TABLE::set_keyread(bool): Assertion `file' failed.

This bug was introduced in this revision: 
kostja@sun.com-20100727102553-b4n2ojcyfj79l2x7
("A pre-requisite patch for the fix for Bug#52044.")

It happens because close_thread_tables() is now called in
open_and_lock_tables upon failure.  Hence, table is no longer
open when optimizer tries to do cleanup.

Fix: Make sure to do cleanup in st_select_lex_unit::prepare()
upon failure. This way, cleanup() is called before tables are
released.
This commit is contained in:
Oystein Grovlen
2010-11-10 15:48:29 +01:00
parent 05e307ae00
commit 117c19c262
3 changed files with 31 additions and 0 deletions

View File

@ -434,6 +434,7 @@ bool st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result,
err:
thd_arg->lex->current_select= lex_select_save;
(void) cleanup();
DBUG_RETURN(TRUE);
}