diff options
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r-- | sql/sql_table.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 2917a320603..2734e5680f2 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -2425,6 +2425,13 @@ int mysql_rm_table_no_locks(THD *thd, TABLE_LIST *tables, bool if_exists, push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE, err, ER_THD(thd, err), tbl_name.c_ptr_safe()); + + /* + Our job is done here. This statement was added to avoid executing + unnecessary code farther below which in some strange corner cases + caused the server to crash (see MDEV-17896). + */ + goto log_query; } else { @@ -2540,6 +2547,7 @@ int mysql_rm_table_no_locks(THD *thd, TABLE_LIST *tables, bool if_exists, mysql_audit_drop_table(thd, table); } +log_query: if (!dont_log_query && !drop_temporary) { non_tmp_table_deleted= (if_exists ? TRUE : non_tmp_table_deleted); |