MySQL Forums
Forum List  »  Partitioning

Re-organize table not working
Posted by: Wane cooper
Date: October 23, 2009 06:02AM

hi,

I would like to reorganize this table.....partition p4 needs to be split to 50000. Since my tables have sub-partitions i cant get the syntax right...I tired to search..but failed

alter table salaries1 reorganize partition p4 into (partition p4a values less than (50000)),subpartition sub1,subpartition sub2);
ERROR 1064 (42000): 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 'subpartition sub1,subpartition sub2)' at line 1



CREATE TABLE salaries1 (
emp_no int(11) NOT NULL,
salary int(11) NOT NULL,
from_date date NOT NULL,
to_date date NOT NULL,
PRIMARY KEY ( emp_no ,salary, from_date )
) ENGINE=InnoDB
partition by range(emp_no)
subpartition by key (salary)
(
partition p0 values less than (10000) (
subpartition b1,
subpartition b2,
subpartition b3
),
partition p1 values less than (20000) (
subpartition b4,
subpartition b5,
subpartition b6
),
partition p2 values less than (30000) (
subpartition b7,
subpartition b8,
subpartition b9
),
partition p3 values less than (40000) (
subpartition b10,
subpartition b11,
subpartition b12
),
partition p4 values less than (80000) (
subpartition b13,
subpartition b14,
subpartition b15
),
partition p5 values less than (160000) (
subpartition b16,
subpartition b17,
subpartition b18
),
partition p6 values less than (3200000) (
subpartition b19,
subpartition b20,
subpartition b21
),
partition p7 values less than (6400000) (
subpartition b22,
subpartition b23,
subpartition b24
),
partition p8 values less than maxvalue (
subpartition b25,
subpartition b26,
subpartition b27
)
);

Options: ReplyQuote


Subject
Views
Written By
Posted
Re-organize table not working
4337
October 23, 2009 06:02AM
2122
October 24, 2009 07:42AM


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.