MySQL Forums
Forum List  »  InnoDB

Add partition by list
Posted by: Jørn Stamnes
Date: August 30, 2018 12:55AM

Hello folks,

I'm trying to add partition by list to a table and have search the Internet for solutions. But none of the examples I have found seem to work. All I get is syntax error:

The last thing I have tried is:

ALTER TABLE mytable
ADD PARTITION BY LIST (foreign_id) (
PARTITION p1 VALUES IN (1),
PARTITION p2 VALUES IN (2),
PARTITION p3 VALUES IN (3),
PARTITION p4 VALUES IN (4),
PARTITION p5 VALUES IN (5),
PARTITION p6 VALUES IN (6)
);

The table has may columsn, one id which is the primary key and one foreign key (the one I want to use in the partition) which can be in the range 1 to 6.

The error say:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BY LIST (foreign_id) (
PARTITION p1 VALUES IN (1),
PARTITION p2 VALUES IN (' at line 2

Options: ReplyQuote


Subject
Views
Written By
Posted
Add partition by list
81
August 30, 2018 12:55AM
41
August 31, 2018 04:19AM
45
August 31, 2018 11:11AM


Sorry, only registered users may post in this forum.

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.