| Bug #85850 | Failure to drop datafile from tablespaces with multiple datafiles | ||
|---|---|---|---|
| Submitted: | 7 Apr 2017 8:40 | Modified: | 23 May 2017 15:53 |
| Reporter: | Magnus Blåudd | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server: Data Dictionary | Severity: | S2 (Serious) |
| Version: | 8.0.2 | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
[23 May 2017 15:53]
Daniel Price
Posted by developer: Fixed as of the upcoming 8.0.2 release, and here's the changelog entry: Attempting to drop a data file from a tablespace with multiple data files returned a duplicate file name error.

Description: It's no longer possible to drop individual datafiles from a tablespace with multiple datafiles. An individual datafile is dropped by using 'ALTER TABLESPACE <tablespace name> DROP DATAFILE <datafile name>' command. How to repeat: mysql> CREATE LOGFILE GROUP lg1 -> ADD UNDOFILE 'undofile.dat' -> INITIAL_SIZE 16M -> UNDO_BUFFER_SIZE = 1M engine = ndb; Query OK, 0 rows affected (0,11 sec) mysql> CREATE TABLESPACE ts1 -> ADD DATAFILE 'datafile.dat' -> USE LOGFILE GROUP lg1 -> INITIAL_SIZE 12M -> ENGINE NDB; Query OK, 0 rows affected (0,14 sec) mysql> ALTER TABLESPACE ts1 -> ADD DATAFILE 'datafile02.dat' -> INITIAL_SIZE = 4M -> ENGINE=NDB; Query OK, 0 rows affected (0,06 sec) mysql> ALTER TABLESPACE ts1 -> DROP DATAFILE 'datafile.dat' -> ENGINE = NDB; ERROR 3584 (HY000): Duplicate file name for tablespace 'ts1' Suggested fix: Handle tablespaces with multiple datafiles.