mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
MDEV-23705 Assertion 'table->data_dir_path || !space'
After DISCARD TABLESPACE, the tablespace of a table will no longer exist, and dict_get_and_save_data_dir_path() would invoke dict_get_first_path() to read an entry from SYS_DATAFILES. For some reason, DISCARD TABLESPACE would not to remove the entry from there. dict_get_and_save_data_dir_path(): If the tablespace has been discarded, do not bother trying to read the name. Side note: The tables SYS_TABLESPACES and SYS_DATAFILES are redundant and subject to removal in MDEV-22343.
This commit is contained in:
@ -39,3 +39,14 @@ TRUNCATE t1;
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
DROP TEMPORARY TABLE t1;
|
||||
#
|
||||
# MDEV-23705 Assertion 'table->data_dir_path || !space'
|
||||
#
|
||||
CREATE TABLE t(c INT) ENGINE=InnoDB;
|
||||
ALTER TABLE t DISCARD TABLESPACE;
|
||||
RENAME TABLE t TO u;
|
||||
TRUNCATE u;
|
||||
Warnings:
|
||||
Warning 1814 Tablespace has been discarded for table `u`
|
||||
TRUNCATE u;
|
||||
DROP TABLE u;
|
||||
|
Reference in New Issue
Block a user