Bug #7878 with utf_general_ci, equals (=) has problem with accent insensitivity
Submitted: 13 Jan 2005 16:28 Modified: 22 Feb 2005 21:00
Reporter: M K Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: MyISAM storage engine Severity:S3 (Non-critical)
Version:4.1.8-nt OS:Windows (Windows 2000)
Assigned to: Alexander Barkov CPU Architecture:Any

[13 Jan 2005 16:28] M K
Description:
Given a table with the following 3 entries in a column:

teste
testé
testé

With latin1 & latin1_swedish_ci it acts as expected:
   SELECT * FROM extable1 WHERE col1 = 'teste'
& SELECT * FROM extable1 WHERE col1 LIKE 'teste'

both give the expected results (all 3 lines):
teste
testé
testé

But:
If you change the column to utf8 & utf8_general_ci it omits the 2nd 'testé' with '='

SELECT * FROM extable1 WHERE col1 = 'teste'
gives you only 2 of the three lines:
teste
testé

SELECT * FROM extable1 WHERE col1 LIKE 'teste'
gives you all three, as expected

How to repeat:
create table with these entries with utf8_general_ci collation

insert these three values: teste, testé, testé

SELECT * FROM extable1 WHERE col1 = 'teste'
[13 Jan 2005 16:36] M K
Edited to correct version number.
[14 Jan 2005 12:04] MySQL Verification Team
Hi,

Thank you for the report, but we can't reproduce it with our test data.
Please, upload dump of the table.
Show also the output of
SELECT HEX(col1) FROM extable1;
[14 Jan 2005 14:12] M K
mysqldump ... extable1 > extable1.sql

Attachment: SELECT HEX col1.txt (text/plain), 200 bytes.

[14 Jan 2005 14:13] M K
mysqldump ... extable1 > extable1.sql

Attachment: extable1.sql (text/plain), 1.49 KiB.

[14 Jan 2005 14:18] M K
Also problematic on Windows XP Pro.
[14 Jan 2005 14:21] M K
Dump and SELECT HEX have been uploaded.
[17 Jan 2005 9:23] Alexander Barkov
I could not reproduce this problem on a Unix machine.

Victoria, can you please verify it on a Windows box?
[18 Feb 2005 12:49] Alexander Barkov
This problem was fixed in 5.0.x earlier.
I just backported the fix into 4.1.11.
[22 Feb 2005 21:00] Paul DuBois
Noted in 4.1.11 changelog.
[25 Feb 2005 17:24] Henri-Maxime Ducoulombier
We had this problem too and we found a workaround in current version (4.1.10)

SET @myVar = 'testé';
SELECT myField FROM tbltest WHERE myField = @myVar;

And it's working when
SELECT myField FROM tbltest WHERE myField = 'testé';

Doesn't. It's wierd.