diff options
author | unknown <gkodinov/kgeorge@magare.gmz> | 2007-08-02 17:11:35 +0300 |
---|---|---|
committer | unknown <gkodinov/kgeorge@magare.gmz> | 2007-08-02 17:11:35 +0300 |
commit | d0536d020fa1b253bf21add584d66b949b119832 (patch) | |
tree | fc91ba892055a449b3849a802b2702675b0415d9 /sql/sql_table.cc | |
parent | 8277581b8952d0c3cde2069de1afbc8afbb9e3f2 (diff) | |
download | mariadb-git-d0536d020fa1b253bf21add584d66b949b119832.tar.gz |
Bug #30193: crash during drop table and kill
When DROP TABLE detects that it has been killed
by another thread it must unlock the table names
it locked.
Fixed by backporting the 5.1 error handling code.
sql/sql_table.cc:
Bug #30193: correct error handling when a thread
is killed inside DROP TABLE.
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r-- | sql/sql_table.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc index d83100aa439..e0104f11be5 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -256,8 +256,8 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists, drop_locked_tables(thd, db, table->table_name); if (thd->killed) { - thd->no_warnings_for_error= 0; - DBUG_RETURN(-1); + error=-1; + goto err_with_placeholders; } alias= (lower_case_table_names == 2) ? table->alias : table->table_name; /* remove form file and isam files */ @@ -338,6 +338,7 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists, } } +err_with_placeholders: if (!drop_temporary) unlock_table_names(thd, tables, (TABLE_LIST*) 0); thd->no_warnings_for_error= 0; |