Bug #49975 Nonsensical error message when dropping a key column from a partitioned table
Submitted: 29 Dec 2009 13:52 Modified: 29 Dec 2009 14:45
Reporter: Bernt Marius Johnsen Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Errors Severity:S3 (Non-critical)
Version:5.1/6.0 OS:Any
Assigned to: CPU Architecture:Any

[29 Dec 2009 13:52] Bernt Marius Johnsen
Description:
Nonsensical error message when dropping a key column from a partitioned table

mysql> create table t (pk integer primary key, i integer) partition by key();
Query OK, 0 rows affected (0.02 sec)

mysql> alter table t drop column pk;
ERROR 1488 (HY000): Field in list of fields for partition function not found in table

Although I kind of understand why the message is like this, it reports a secondary effect and is not very helpful.

How to repeat:
create table t (pk integer primary key, i integer) partition by key();
alter table t drop column pk;
[29 Dec 2009 14:45] MySQL Verification Team
Thank you for the bug report.