Description:
Create a table 't4' using CHAR(255) Unicode datatype. Insert the values in table 't4' with atleast two same values . If tried to make UNIQUE key index on that column it does not display appropriate error message.
How to repeat:
1. Set the delimiter.
Delimiter //
2. Use database 'test' i.e. execute the following SQL statement:
use test//
3. Create a table 't4' ie execute the following SQL statement:
create table t4 (f235 char(255) unicode)//
4. Insert values in table 't4' ie execute the following SQL statement:
insert into t4 values ('abc'),('bcd'),('abc')//
5. Set unique index ie execute the following SQL statement:
ALTER TABLE t4 ADD UNIQUE Index_1 (f235)//
6. Observe that the execution displays the following error message
ERROR 1062 (23000): Duplicate entry '' for key 1
Expected Results: Step 5 execution should display the proper error message as:
ERROR 1062 (23000): Duplicate entry 'abc' for key 1.
Actual Results : Step 5 execution displays the error message as:
ERROR 1062 (23000): Duplicate entry '' for key 1
Description: Create a table 't4' using CHAR(255) Unicode datatype. Insert the values in table 't4' with atleast two same values . If tried to make UNIQUE key index on that column it does not display appropriate error message. How to repeat: 1. Set the delimiter. Delimiter // 2. Use database 'test' i.e. execute the following SQL statement: use test// 3. Create a table 't4' ie execute the following SQL statement: create table t4 (f235 char(255) unicode)// 4. Insert values in table 't4' ie execute the following SQL statement: insert into t4 values ('abc'),('bcd'),('abc')// 5. Set unique index ie execute the following SQL statement: ALTER TABLE t4 ADD UNIQUE Index_1 (f235)// 6. Observe that the execution displays the following error message ERROR 1062 (23000): Duplicate entry '' for key 1 Expected Results: Step 5 execution should display the proper error message as: ERROR 1062 (23000): Duplicate entry 'abc' for key 1. Actual Results : Step 5 execution displays the error message as: ERROR 1062 (23000): Duplicate entry '' for key 1