From 6960e9ed24dbdab587730cdceab1f29bcdd6d52a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Thu, 19 Mar 2020 14:23:47 +0200 Subject: 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. --- storage/innobase/dict/dict0dict.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'storage/innobase/dict/dict0dict.cc') 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) -- cgit v1.2.1