MySQL Forums
Forum List  »  Partitioning

Unable to EXCHANGE PARTITION when partition uses tablespace
Posted by: bob Dave
Date: June 02, 2016 03:24AM

am attempting to use partitioned tables across multiple tablespaces with MySQL, however when I come to exchange partitions with tables, I get the following error:

Error Code: 1731. Non matching attribute 'TABLESPACE' between partition and table

Is there any way to use both partitioning and tablespaces when the EXCHANGE PARTITION command is required?

The SQL code below can be used to reproduce this issue:

CREATE TABLE `testTableMain` (
`intKey` bigint(20)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
PARTITION BY RANGE COLUMNS(intKey)
(PARTITION P_DEFAULT VALUES LESS THAN (0) ENGINE = InnoDB,
PARTITION P_1 VALUES LESS THAN (7) TABLESPACE `PUBLIC` ENGINE = InnoDB);

CREATE TABLE `testTableSwap` (
`intKey` bigint(20)
) TABLESPACE `PUBLIC` ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

ALTER TABLE testTableMain
EXCHANGE PARTITION P_1
WITH TABLE testTableSwap

Options: ReplyQuote


Subject
Views
Written By
Posted
Unable to EXCHANGE PARTITION when partition uses tablespace
2299
June 02, 2016 03:24AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.