CREATE TABLE bug41904 (id INT PRIMARY KEY, uniquecol CHAR(15)) ENGINE=InnoDB; INSERT INTO bug41904 VALUES (1,NULL), (2,NULL); CREATE UNIQUE INDEX ui ON bug41904 (uniquecol); DROP TABLE bug41904;