Bug #29418 ERROR 1491 (HY000): A UNIQUE INDEX must include all columns in the table's parti

Submitted: 28 Jun 2007 12:42 Modified: 28 Jun 2007 13:03
Reporter: Mauro Braggio Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Partitions Severity:S3 (Non-critical)
Version: 5.1.19-beta-log MySQL OS:Linux
Assigned to: CPU Architecture:Any

[28 Jun 2007 12:42] Mauro Braggio
Description:
if i alter a table mysql return me this error:

ERROR 1491 (HY000): A UNIQUE INDEX must include all columns in the table's partitioning function

The indexes is correct, if they are incorrect mysql returns:

ERROR 1491 (HY000): A PRIMARY INDEX must include all columns in the table's partitioning function

If i create a new table, mysql works.

How to repeat:
CREATE TABLE test  (
  `sr_recno` bigint(15) NOT NULL AUTO_INCREMENT,
  `d1` date NOT NULL DEFAULT '0000-00-00',
 PRIMARY KEY (`sr_recno`,`data_mov`),
)

ALTER TABLE test PARTITION BY RANGE (year(data_mov)) (  PARTITION p0 VALUES LESS THAN (1995) );
[28 Jun 2007 13:03] Mauro Braggio
I can't reproduce the error.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.038 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
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.