Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
10.0.35
-
None
Description
It is documented that InnoDB ignores DATA DIRECTORY for partitions on ALTER TABLE. But it ignores it silently and that's an issue. In contrast altering DATA DIRECTORY for table (not partitions) issues a warning for both InnoDB and MyISAM.
https://mariadb.com/kb/en/library/create-table/#data-directoryindex-directory
CREATE TABLE t ( |
a INT NOT NULL |
) ENGINE=INNODB
|
PARTITION BY HASH (a) ( |
PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp/partitions_here/' ENGINE = INNODB, |
PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp/partitions_here/' ENGINE = INNODB |
);
|
INSERT INTO t VALUES (1); |
ALTER TABLE t REORGANIZE PARTITION p1,p2 INTO ( |
PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp/partitions_somewhere_else/' ENGINE = INNODB, |
PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp/partitions_somewhere_else/' ENGINE = INNODB |
);
|
SHOW CREATE TABLE t; |
Table Create Table |
t CREATE TABLE `t` ( |
`a` int(11) NOT NULL |
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
/*!50100 PARTITION BY HASH (a)
|
(PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp/partitions_here' ENGINE = InnoDB,
|
PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp/partitions_here' ENGINE = InnoDB) */
|
select * from t; |
a
|
1
|
DROP TABLE t; |
The fix is to add a warning for that case.
Attachments
Issue Links
- relates to
-
MDEV-14618 "reorganize partition" ignores "data directory"
- Open
-
MDEV-15953 Alter InnoDB Partitioned Table Moves Files (which were originally not in the datadir) to the datadir
- Closed