MySql - partition by range and unique key
Then error message itself explains the problem. Please, read the manual,
http://dev.mysql.com/doc/refman/5.1/en/partitioning-limitations-partitioning-keys-unique-k...:

"The rule is : All columns used in the partitioning expression for a partitioned table must be part of every unique key that the table may have.
In simple words, every unique key on the table must use every column in the table's
partitioning expression."