summaryrefslogtreecommitdiff
path: root/sql/sql_table.cc
diff options
context:
space:
mode:
authorRobert Bindar <robert@mariadb.org>2019-10-10 12:58:29 +0300
committerRobert Bindar <robert@mariadb.org>2019-10-31 12:42:14 +0200
commitaf25a8e1264d9a9a57419957a2c9cb0ef5226c48 (patch)
treef0ac8932fcb1f97fd1bff597e98e7999a2da8da9 /sql/sql_table.cc
parent1bb857089fdcd3a08cb166cb6d75f3e1dbb76f27 (diff)
downloadmariadb-git-bb-10.1-robert.tar.gz
MDEV-17896 Assertion `pfs->get_refcount() > 0' failedbb-10.1-robert
Unfortunate DROP TEMPORARY..IF EXISTS on a regular table may allow subsequent CREATE TABLE statements to steal away the PFS_table_share instance from the dropped table.
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r--sql/sql_table.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 467e91ce6c7..e694c52e272 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -2418,6 +2418,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).
+ */
+ continue;
}
else
{