I have a table with a unique constraint in the varchar field. When I try to insert "e" and "e" in two different lines, I am offered a unique violation of restrictions. Performing the following select shows that MySQL counts equivalent letters, even though their HEX values ββare equal to D0B5 and D191, respectively.
select '' = '', hex(''), hex('');
After a lot of Googling, I came across this MySQL error report, which seems to handle this problem. Sveta Smirnovaβs most recent answer states that this design behavior is related to the sorting diagram for utf8_unicode_ci, European alphabets (MySQL 6.0.4) .
How do you tell MySQL that "e" is not equal to "e" for query purposes and how to change the unique constraint to take note of this fact?
mysql
Frank
source share