MySQL Forums
Forum List  »  Partitioning

not able to create multi column partition keys
Posted by: jose PK
Date: December 02, 2010 03:06AM

Hi ,

I have created a table with single column partitioning

CREATE TABLE t100 ( id INT, d DATETIME )
PARTITION BY LIST ( TO_DAYS(d) )
(
PARTITION p001 VALUES IN ( TO_DAYS('2001-01-01') ) ,
PARTITION p002 VALUES IN ( TO_DAYS('2001-02-01') )
);

But when I am trying to create another table with multi column partitioning

like
CREATE TABLE t101 ( id INT, d DATETIME )
PARTITION BY LIST COLUMNS ( id ,TO_DAYS(d) )
(
PARTITION p001 VALUES IN ((1, TO_DAYS('2001-01-01'))) ,
PARTITION p002 VALUES IN ((2, TO_DAYS('2001-02-01')))
);
it is failing
with following error

Query : CREATE table t101 ( id int, d DATEtime ) PARTITION by LIST columns ( id ,to_days(d) ) ( partition p0...
Error Code : 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 '(d) )
(partition p001 VALUES IN ((1, to_days('2001-01-01')))' at line 2


Mysql version is Mysql 5.5



One observation is I am not able to create any multi column partition key having any functions like to_days() or year() etc...


Please help me in solving this issue

Thanks a lot

- jp

Options: ReplyQuote


Subject
Views
Written By
Posted
not able to create multi column partition keys
3704
December 02, 2010 03:06AM


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.