diff options
author | Robert Bindar <robert@mariadb.org> | 2019-10-10 12:58:29 +0300 |
---|---|---|
committer | Robert Bindar <robert@mariadb.org> | 2019-11-01 11:10:04 +0200 |
commit | 6f86150ab3c9059a9379fcc68cb90da78e59e5cb (patch) | |
tree | 1235fd6c6dd9c00f48a3dc3baac465a8eae1d361 /sql/sql_table.cc | |
parent | d925aec1c10cebf6c34825a7de50afe4e630aff4 (diff) | |
download | mariadb-git-6f86150ab3c9059a9379fcc68cb90da78e59e5cb.tar.gz |
MDEV-17896 Assertion `pfs->get_refcount() > 0' failed
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.cc | 7 |
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 { |