MySQL Forums
Forum List  »  General

Strange Primary Key Violation
Posted by: Leo Hernandez
Date: August 09, 2016 12:20PM

I have a column of values full of special characters. I'm trying to create add a primary for that columns and the command finds that there are duplicate values in that column:

MariaDB [AR]> alter table master add primary key(path);
ERROR 1062 (23000): Duplicate entry '1%03N_' for key 'PRIMARY'

But then I run this select to see which rows have duplicate values in this field:

MariaDB [AR]> select * from master where path='1%03N_';
+--------+-------------------------------------------------------+---------+------+
| path | clipid | grp | m |
+--------+-------------------------------------------------------+---------+------+
| 1%03N_ | AD0S9TT9UB8Q7e890GMTC46KBIPG417JGNM50B0E2B77QQFTKLIVJ | THGSTsf | 1 |
+--------+-------------------------------------------------------+---------+------+
1 row in set (0.04 sec)

... and I find only one row.

What is going on here??

Options: ReplyQuote


Subject
Written By
Posted
Strange Primary Key Violation
August 09, 2016 12:20PM


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.