hi all,
we have come across a scenario where we have a table with partitioning by key.
CREATE TABLE IF NOT EXISTS a3 ( ID VARCHAR(50) NOT NULL, TYPE varchar(50) ,CREATED_ON TIMESTAMP DEFAULT CURRENT_TIMESTAMP, LAST_MODIFIED TIMESTAMP ) ENGINE = InnoDB CHARACTER SET utf8 PARTITION BY KEY (TYPE) PARTITIONS 10;
when we try to add primary key on ID, we get
the error
ERROR 1503 (HY000): A PRIMARY KEY must include all columns in the table's partitioning function.
before adding the primary key, "desc a3" works fine.
After executing the command "alter table a3 add primary key(id)"
the following happens
(1) "desc a3"- throws the error "ERROR 1503 (HY000): A PRIMARY KEY must include all columns in the table's partitioning function."
(2) information_schema.tables shows the storage engine as NULL FOR THE table a3
the logs have the following error:
| 1033 | Incorrect information in file: './test/a3.frm'
this is happening only a particular instance of mysql.
any help will be appreciated.
thanks,
vishnu rao
we have come across a scenario where we have a table with partitioning by key.
CREATE TABLE IF NOT EXISTS a3 ( ID VARCHAR(50) NOT NULL, TYPE varchar(50) ,CREATED_ON TIMESTAMP DEFAULT CURRENT_TIMESTAMP, LAST_MODIFIED TIMESTAMP ) ENGINE = InnoDB CHARACTER SET utf8 PARTITION BY KEY (TYPE) PARTITIONS 10;
when we try to add primary key on ID, we get
the error
ERROR 1503 (HY000): A PRIMARY KEY must include all columns in the table's partitioning function.
before adding the primary key, "desc a3" works fine.
After executing the command "alter table a3 add primary key(id)"
the following happens
(1) "desc a3"- throws the error "ERROR 1503 (HY000): A PRIMARY KEY must include all columns in the table's partitioning function."
(2) information_schema.tables shows the storage engine as NULL FOR THE table a3
the logs have the following error:
| 1033 | Incorrect information in file: './test/a3.frm'
this is happening only a particular instance of mysql.
any help will be appreciated.
thanks,
vishnu rao