Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 160569 - Using enums in multiple column primary keys is handled wrong in InnoDB storage engine
Summary: Using enums in multiple column primary keys is handled wrong in InnoDB storag...
Alias: None
Product: Fedora
Classification: Fedora
Component: mysql
Version: 4
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Tom Lane
QA Contact: David Lawrence
Depends On:
TreeView+ depends on / blocked
Reported: 2005-06-15 20:28 UTC by Michal Piotrowski
Modified: 2013-07-03 03:06 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2005-06-16 04:33:01 UTC

Attachments (Terms of Use)
Test case (deleted)
2005-06-15 20:30 UTC, Michal Piotrowski
no flags Details

Description Michal Piotrowski 2005-06-15 20:28:33 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; pl-PL; rv:1.7.8) Gecko/20050524 Fedora/1.0.4-4 Firefox/1.0.4

Description of problem:
If you use InnoDB engine and create table with multiple column primary key where one of the columns is of enum type then it is handled wrong. MySQL reports duplicate keys where there aren't any.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Create table with multiple column primary key where one of the coulumns would be enum (for example int and enum).
2. Try to insert 2 rows, where there be changing only enum column.


Actual Results:  MySQL returns message like this:
ERROR 1062 (23000): Duplicate entry '1-b' for key 1

Expected Results:  Possible to add keys which are different only on the enum column.

Additional info:

This bug is registered in MySQL bug tracking system as bugs #9380 and and #9526 ( There is a fix submitted.

Comment 1 Michal Piotrowski 2005-06-15 20:30:40 UTC
Created attachment 115506 [details]
Test case

To simplify testing I'm attaching this short SQL script.

Comment 2 Tom Lane 2005-06-16 04:33:01 UTC
We generally do not try to fix noncritical issues in advance of the upstream developers; for one reason, in 
this particular package we do not have the expertise to determine if a proposed fix is any good.  So my 
plan is to wait for a MySQL release in which this is fixed ...

Comment 3 Michal Piotrowski 2005-06-16 10:51:32 UTC
It would be great if there would be an update (a fix is done in MySQL version

Note You need to log in before you can comment on or make changes to this bug.