MySQL Forums
Forum List  »  Partitioning

Partitioning by Timestamp with to_days function but PKEY is ID
Posted by: Frank Schuster
Date: August 04, 2009 08:05AM

Hello together,

I think my problem is known but I don't know any solution for this problem.

I want a primary key ID with auto_increment but the partitioning is only using the timestamp with the to_days function.

PARTITION BY RANGE (TO_DAYS(timestamp))(...);

But then I get ERROR 1503 (HY000): A PRIMARY KEY must include all columns in the table's partitioning function

I know that I didn't use the PKEY ID but can I avoid the problem with a trick?
Something like this (TO_DAYS(timestamp)+id-id <-- this get the same error 1503) or something else?

Options: ReplyQuote


Subject
Views
Written By
Posted
Partitioning by Timestamp with to_days function but PKEY is ID
3812
August 04, 2009 08:05AM


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.