MySQL Forums
Forum List  »  InnoDB

create unique index problem on innodb plugin 1.0.2
Posted by: Marco Mezzena Segundo
Date: December 21, 2008 08:34PM

I´m using MySql 5.1.30 and innodb plugin 1.0.2 on Windows

On MyIsam and previous InnoDB version the creation of unique index on column that accept null value had worked on a populated table. If the creation of index is before inserting rows, it works ok. I doesn´t find changed behavior on documentation. Is this a bug?

Example to reproduce the error:

CREATE TABLE `test` (
`id` int(9) NOT NULL AUTO_INCREMENT,
`uniquecol` char(15) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB

insert into `test`
(`id`,`uniquecol`)
values (1,NULL)

insert into `test`
(`id`,`uniquecol`)
values (2,NULL)

create unique index ui on test (uniquecol)

Error: Duplicate entry '' for key 'ui'



Edited 2 time(s). Last edit at 12/29/2008 07:49AM by Marco Mezzena Segundo.

Options: ReplyQuote


Subject
Views
Written By
Posted
create unique index problem on innodb plugin 1.0.2
3606
December 21, 2008 08:34PM


Sorry, you can't reply to this topic. It has been closed.

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.