diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-01-18 06:46:39 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-01-18 06:46:39 +0200 |
commit | 1d72db45a880d07fec5eda648601235f96a693c0 (patch) | |
tree | 128d7f7a64af58edd96a2194d26e0e0dd1e9116f | |
parent | c1aae370879490dc0a3cd63c5b1010fa21b1f62c (diff) | |
download | mariadb-git-1d72db45a880d07fec5eda648601235f96a693c0.tar.gz |
MDEV-18237 InnoDB: Unable to drop FTS index aux table and further errors (possibly bogus)
row_drop_table_for_mysql(): Fix a regression introduced in MDEV-16515.
Similar to the follow-up fixes MDEV-16647 and MDEV-17470, we must make
the internal tables of FULLTEXT INDEX immune to kills, to avoid noise
and resource leakage on DROP TABLE or ALTER TABLE. (Orphan internal tables
would be dropped at the next InnoDB startup only.)
-rw-r--r-- | storage/innobase/row/row0mysql.cc | 6 | ||||
-rw-r--r-- | storage/xtradb/row/row0mysql.cc | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/storage/innobase/row/row0mysql.cc b/storage/innobase/row/row0mysql.cc index 6ccedfd5343..afab1822bf5 100644 --- a/storage/innobase/row/row0mysql.cc +++ b/storage/innobase/row/row0mysql.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 2000, 2018, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2015, 2018, MariaDB Corporation. +Copyright (c) 2015, 2019, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -4225,7 +4225,9 @@ row_drop_table_for_mysql( hold the InnoDB dictionary lock, we will drop any adaptive hash index entries upfront. */ const bool is_temp = dict_table_is_temporary(table) - || strstr(tablename_minus_db, tmp_file_prefix); + || strncmp(tablename_minus_db, tmp_file_prefix, + tmp_file_prefix_length) + || strncmp(tablename_minus_db, "FTS_", 4); while (buf_LRU_drop_page_hash_for_tablespace(table)) { if ((!is_temp && trx_is_interrupted(trx)) || srv_shutdown_state != SRV_SHUTDOWN_NONE) { diff --git a/storage/xtradb/row/row0mysql.cc b/storage/xtradb/row/row0mysql.cc index 57d06e58943..6c11dd78d7a 100644 --- a/storage/xtradb/row/row0mysql.cc +++ b/storage/xtradb/row/row0mysql.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 2000, 2018, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2015, 2018, MariaDB Corporation. +Copyright (c) 2015, 2019, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -4235,7 +4235,9 @@ row_drop_table_for_mysql( hold the InnoDB dictionary lock, we will drop any adaptive hash index entries upfront. */ const bool is_temp = dict_table_is_temporary(table) - || strstr(tablename_minus_db, tmp_file_prefix); + || strncmp(tablename_minus_db, tmp_file_prefix, + tmp_file_prefix_length) + || strncmp(tablename_minus_db, "FTS_", 4); while (buf_LRU_drop_page_hash_for_tablespace(table)) { if ((!is_temp && trx_is_interrupted(trx)) || srv_shutdown_state != SRV_SHUTDOWN_NONE) { |