1
0
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:
Georgi Kodinov
2009-12-03 14:07:46 +02:00
parent 3707a74e6e
commit 1457d7b367
3 changed files with 29 additions and 1 deletions

View File

@@ -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);
}