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
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