Bug #3107 patternmismatch in -> where x like '%ü%'
Submitted: 8 Mar 2004 7:22 Modified: 22 Jun 2004 0:12
Reporter: [ name withheld ] Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.0.18 OS:Linux (Linux RH)
Assigned to: Assigned Account CPU Architecture:Any

[8 Mar 2004 7:22] [ name withheld ]
Description:

select * from x where name like '%ü%';

shows up results which does not contain the char 'ü' at all.

select * from x where name like '%ö%';
select * from x where name like '%ä%';

work both without errors.

Codepage ISO-8859-1 ( latin 1 ) 

äüö are german accents.

ü =FC ( 252 )

How to repeat:
just enter the select in any db you like ,
it's unimportant if you use phpMyAdmin or shell clients,
even the OS is unimportant for it.

Suggested fix:

none
[8 Mar 2004 12:54] Dean Ellis
This is possibly due to the different rules for some characters in the Swedish rules used by default.  You can try using latin1_de, but to verify whether or not this is the case, please submit the SQL to create/populate/query a table demonstrating this behavior.
[16 Mar 2004 1:41] [ name withheld ]
Demodata as requested:

CREATE TABLE demo (
  domain varchar(255) NOT NULL default '',
  domain_updated timestamp(14) NOT NULL,
  PRIMARY KEY  (domain),
  KEY domain (domain)
) TYPE=MyISAM;

#
# Daten für Tabelle `demo`
#

INSERT INTO demo VALUES ('xn--bieneundbr-y5a.de', 20040305172847);
INSERT INTO demo VALUES ('thomasstinsky.de', 20040305173227);
INSERT INTO demo VALUES ('my-gaestebuch.de', 20040305182421);
INSERT INTO demo VALUES ('xn--flyerknig24-wfb.de', 20040310163813);
INSERT INTO demo VALUES ('pink-handy.de', 20040309230012);
INSERT INTO demo VALUES ('pinkhandy.de', 20040309230019);
INSERT INTO demo VALUES ('klysscam.de', 20040310103418);
INSERT INTO demo VALUES ('motocykl.info', 20040310211514);
INSERT INTO demo VALUES ('motocykle.info', 20040310211548);
INSERT INTO demo VALUES ('e-harmony.de', 20040310220443);
INSERT INTO demo VALUES ('bennys-shop.com', 20040315142937);

SELECT * FROM `demo` WHERE domain like '%ü%';
[19 May 2004 8:53] [ name withheld ]
something new about it?
[22 May 2004 0:12] Dean Ellis
This does appear to be due to the different rules for handling accented characters.  Starting mysqld with --default-character-set=latin1_de does appear to have the results you want; would you test this and see?
[14 Feb 2005 22:54] 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".