MySQL Forums
Forum List  »  Partitioning

ERROR 1486 (HY000): Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
Posted by: Chaya Shindhe
Date: February 18, 2010 04:21AM

Hi,

I'm trying to create a partition table
CREATE TABLE TEST
(
ID INT NOT NULL AUTO_INCREMENT,
SETG_DATE TIMESTAMP NOT NULL DEFAULT now(),
PRIMARY KEY (ID,SETG_DATE)
)
ENGINE=INNODB
PARTITION BY RANGE (TO_DAYS(SETG_DATE))
(
PARTITION MONTH_NULL VALUES LESS THAN (0),
PARTITION JAN VALUES LESS THAN (TO_DAYS('2010-01-01')),
PARTITION FEB VALUES LESS THAN (TO_DAYS('2010-03-01')),
PARTITION MARCH VALUES LESS THAN (TO_DAYS('2010-04-01')),
PARTITION APRIL VALUES LESS THAN (TO_DAYS('2010-05-01')),
PARTITION MAY VALUES LESS THAN (TO_DAYS('2010-06-01')),
PARTITION JUNE VALUES LESS THAN (TO_DAYS('2010-07-01')),
PARTITION JULY VALUES LESS THAN (TO_DAYS('2010-08-01')),
PARTITION AUG VALUES LESS THAN (TO_DAYS('2010-09-01')),
PARTITION SEP VALUES LESS THAN (TO_DAYS('2010-10-01')),
PARTITION OCT VALUES LESS THAN (TO_DAYS('2010-11-01')),
PARTITION NOV VALUES LESS THAN MAXVALUE
);

I'm able to create this partitioned table in "Server version: 5.1.41-log MySQL Community Server (GPL)"

But its throwing the error "ERROR 1486 (HY000): Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed" when im trying to do it in "Server version: 5.1.43 MySQL Community Server (GPL)"

Can you please provide me the solution as soon as possible.

Options: ReplyQuote


Subject
Views
Written By
Posted
ERROR 1486 (HY000): Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
23888
February 18, 2010 04:21AM


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.