Bug #10102 InnoDB: Cannot create unique key on char unicode datatype
Submitted: 22 Apr 2005 18:11 Modified: 22 Jul 2005 7:26
Reporter: Disha Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S2 (Serious)
Version:5.0.4 Beta OS:Windows (Windows 2003)
Assigned to: CPU Architecture:Any

[22 Apr 2005 18:11] Disha
Description:
Consider a table comprising of a char unicode field and database engine specified as Innodb. Try to create a unique key index on the char unicode field and find that such a key cannot be created.

How to repeat:
1. Create table tb1( f1 char unicode) Engine=Innodb;
2. Alter table tb1 add UNIQUE INDEX_1(f1);

Actual Result:
Error code (1167): The used storage engine cant index

Expected Result:
No such error code should be displayed.
[24 Apr 2005 14:53] Heikki Tuuri
Disha,

what is your my.cnf like? Do you have data in the table?

I am not able to repeat:

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.0.5-beta-debug-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> Create table tb1( f1 char unicode) Engine=Innodb;
Query OK, 0 rows affected (0.27 sec)

mysql> Alter table tb1 add UNIQUE INDEX_1(f1);
Query OK, 0 rows affected (0.24 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql>

Regards,

Heikki
[24 May 2005 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[22 Jul 2005 7:24] Disha
This bug is not reproducible on 5.0.9. Please close.
[27 Mar 2006 8:42] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/4181