MySQL Forums
Forum List  »  Partitioning

Solve this partition puzzle
Posted by: santhosh edukulla
Date: April 20, 2011 04:22AM

I have a table structure as below:

CREATE TABLE U
(
id bigint(11) unsigned NOT NULL,
creationdate Date NOT NULL,
primary key(id,creationdate)
)ENGINE=InnoDB DEFAULT CHARSET=latin1
PARTITION BY LIST (DAY(creationdate))
(
PARTITION p1 VALUES IN (1) ENGINE = InnoDB,---------------

)
etc

partitioned by date. If we see the table, it has (id,creationdate) as partition.

With this id's entered per date are coming as unique. But, on next day again these id's are appearing again.
But, i want also the id of this table to be unique.

If we keep a unique check on ID, it is crying fould saying that
A UNIQUE KEY must include all columns in the table's partitioning function

How to go about this? Any idea?

Thx,
Santhosh

Options: ReplyQuote


Subject
Views
Written By
Posted
Solve this partition puzzle
4126
April 20, 2011 04:22AM
1642
April 22, 2011 12:07AM


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.