summaryrefslogtreecommitdiff
path: root/storage/innobase/dict
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-03-19 14:23:47 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2020-03-19 14:23:47 +0200
commit6960e9ed24dbdab587730cdceab1f29bcdd6d52a (patch)
tree9f0e495db2eb4a9c2608f5e52faab764c650b40e /storage/innobase/dict
parent9fd692aecacfc944fd3a6a58f4cae5a49eeb1cf0 (diff)
downloadmariadb-git-6960e9ed24dbdab587730cdceab1f29bcdd6d52a.tar.gz
MDEV-21983: Crash on DROP/RENAME TABLE after DISCARD TABLESPACE
fil_delete_tablespace(): Remove the unused parameter drop_ahi, and add the parameter if_exists=false. We want to suppress error messages if we know that the tablespace has been discarded. dict_table_rename_in_cache(): Pass the new parameter to fil_delete_tablespace(), that is, do not complain about missing tablespace if the tablespace has been discarded. row_make_new_pathname(): Declare as static. row_drop_table_for_mysql(): Tolerate !table->data_dir_path when the tablespace has been discarded. row_rename_table_for_mysql(): Skip part of the RENAME TABLE when fil_space_get_first_path() returns NULL.
Diffstat (limited to 'storage/innobase/dict')
-rw-r--r--storage/innobase/dict/dict0dict.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/storage/innobase/dict/dict0dict.cc b/storage/innobase/dict/dict0dict.cc
index cf70047ab15..455d51af438 100644
--- a/storage/innobase/dict/dict0dict.cc
+++ b/storage/innobase/dict/dict0dict.cc
@@ -1630,7 +1630,8 @@ dict_table_rename_in_cache(
return(DB_OUT_OF_MEMORY);
}
- fil_delete_tablespace(table->space);
+ fil_delete_tablespace(table->space,
+ dict_table_is_discarded(table));
/* Delete any temp file hanging around. */
if (os_file_status(filepath, &exists, &ftype)