Bug #53396 latin1_german2_ci not finding 'ü' by looking for 'ue'
Submitted: 4 May 2010 5:24 Modified: 4 May 2010 13:31
Reporter: Susanne Ebrecht Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Charsets Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: CPU Architecture:Any
Triage: Needs Triage: D3 (Medium)

[4 May 2010 5:24] Susanne Ebrecht
Description:
CREATE TABLE t(v VARCHAR(100) COLLATE latin1_german2_ci);

/* If you have utf8 terminal use:
SET NAMES utf8; */

INSERT INTO t VALUES('Müller'),('Mueller'),('Muller'),('Bär'),('Baer'),(Bar);

SELECT v FROM t WHERE v LIKE 'Mül%';

Result should be Müller and Mueller but it is just Müller.

SELECT v FROM t WHERE v LIKE 'Muel%';
Result should be Müller and Mueller but it is just Mueller.

All works fine by using '=' instead of LIKE:
SELECT v FROM t where v = 'Mueller' => Result: Müller and Mueller

But as far as you are using LIKE it is not working.

Same of course when you test values Bar, Bär, Baer.

How to repeat:
See above

Suggested fix:
LIKE should find 'ä' by looking for 'ae' and vise versa.
LIKE should find 'ö' by looking for 'oe' and vise versa.
LIKE should find 'ü' by looking for 'ue' and vise versa.
[4 May 2010 13:31] Peter Gulutzan
MySQL behaviour is correct and documented here:
http://dev.mysql.com/doc/refman/5.0/en/string-comparison-functions.html