mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Bug #48985: show create table crashes if previous access to the table was killed
When checking for an error after removing the special view error handler the code was not taking into account that open_tables() may fail because of the current statement being killed. Added a check for thd->killed. Added a client program to test it.
This commit is contained in:
@@ -719,7 +719,7 @@ mysqld_show_create(THD *thd, TABLE_LIST *table_list)
|
||||
thd->push_internal_handler(&view_error_suppressor);
|
||||
bool error= open_normal_and_derived_tables(thd, table_list, 0);
|
||||
thd->pop_internal_handler();
|
||||
if (error && thd->main_da.is_error())
|
||||
if (error && (thd->killed || thd->main_da.is_error()))
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user