summaryrefslogtreecommitdiff
path: root/sql/sql_table.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-11-06 10:18:51 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2019-11-06 10:18:51 +0200
commit8688ef22c21b810e7d5d4732a3f73035eb171879 (patch)
treecbcea402e9c8039e5752c71e1193985406777f2d /sql/sql_table.cc
parentd7a2401750bb29dfdb45929a536539b9f17b347f (diff)
parent4e99e67c4e8a04bd03cb0e7efc2ce0129af60c34 (diff)
downloadmariadb-git-8688ef22c21b810e7d5d4732a3f73035eb171879.tar.gz
Merge 10.1 to 10.2
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r--sql/sql_table.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 1d135ca83f8..4ad68d9d03b 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -2389,6 +2389,13 @@ int mysql_rm_table_no_locks(THD *thd, TABLE_LIST *tables, bool if_exists,
ER_BAD_TABLE_ERROR,
ER_THD(thd, ER_BAD_TABLE_ERROR),
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
{
@@ -2497,6 +2504,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);