Red Hat Bugzilla – Bug 160569
Using enums in multiple column primary keys is handled wrong in InnoDB storage engine
Last modified: 2013-07-02 23:06:07 EDT
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):
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.
This bug is registered in MySQL bug tracking system as bugs #9380 and and #9526 (http://bugs.mysql.com). There is a fix submitted.
Created attachment 115506 [details]
To simplify testing I'm attaching this short SQL script.
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 ...
It would be great if there would be an update (a fix is done in MySQL version