diff options
author | Georgi Kodinov <joro@sun.com> | 2009-12-03 14:07:46 +0200 |
---|---|---|
committer | Georgi Kodinov <joro@sun.com> | 2009-12-03 14:07:46 +0200 |
commit | 9091535c5fc914aecaa51acf6e558ccd9800fd88 (patch) | |
tree | 05e1b50d13cd309dfc81bea28417c8ce580d7293 /sql/sql_show.cc | |
parent | 7622134333ef91e5e88e981288aaf09f7202d54a (diff) | |
download | mariadb-git-9091535c5fc914aecaa51acf6e558ccd9800fd88.tar.gz |
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.
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r-- | sql/sql_show.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 2c1f360104b..e55000c0f65 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -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); } |