1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

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.
This commit is contained in:
Marko Mäkelä
2020-03-19 14:23:47 +02:00
parent 9fd692aeca
commit 6960e9ed24
8 changed files with 27 additions and 42 deletions

View File

@ -35,7 +35,9 @@ ALTER TABLE t DISCARD TABLESPACE;
Warnings:
Warning 1812 Tablespace is missing for table 'test/t'
Warning 1812 Tablespace is missing for table 'test/t'
DROP TABLE t;
RENAME TABLE t TO u;
RENAME TABLE u TO v;
DROP TABLE v;
SELECT * FROM `x..d`;
ERROR HY000: Got error 194 "Tablespace is missing for a table" from storage engine InnoDB
DROP TABLE `x..d`;