summaryrefslogtreecommitdiff
path: root/sql/sql_show.cc
diff options
context:
space:
mode:
authorGeorgi Kodinov <joro@sun.com>2009-12-03 14:07:46 +0200
committerGeorgi Kodinov <joro@sun.com>2009-12-03 14:07:46 +0200
commit1457d7b3679956e5d97a34e58a7b0ff5dffcec85 (patch)
tree05e1b50d13cd309dfc81bea28417c8ce580d7293 /sql/sql_show.cc
parent3707a74e6e97a86531d2284e8e3106b30c2297b2 (diff)
downloadmariadb-git-1457d7b3679956e5d97a34e58a7b0ff5dffcec85.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.cc2
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);
}