Bug #11917 When collate is german there is no difference between s and ß
Submitted: 13 Jul 2005 15:32 Modified: 18 Jul 2005 5:10
Reporter: Neculai Macarie Email Updates:
Status: Not a Bug Impact on me:
Category:MySQL Server Severity:S2 (Serious)
Version:4.1.12 OS:Microsoft Windows (Windows, Linux)
Assigned to: Alexander Barkov CPU Architecture:Any

[13 Jul 2005 15:32] Neculai Macarie
When selecting from a table with collate set to german incorrect results are returned ('s' and 'ß' characters are assumed to be identical, but they are not).

How to repeat:
drop table if exists test;
create table test ( name char(100) character set latin1 collate latin1_german1_ci )
charset latin1 collate latin1_german1_ci;

insert into test(name) values('se'), ('ße');
SELECT * FROM test where name='se';

This should return only one row, but it returns 2 rows.

MySQL command line client works ok.
MySQL Query Browser 1.1.9 has the same bug (returns 2 rows instead of one).
[14 Jul 2005 7:41] Vasily Kishkin
Tested on Win 2000 Sp4, MySQL server 4.1.13
[18 Jul 2005 5:10] Alexander Barkov
This is not a bug. This is how this collation was designed to work.

If you need "ß" to be compared as "ss", please use latin1_german2_ci
or utf8_unicode_ci.
[20 Jul 2005 11:24] Neculai Macarie
As I understand collation plays a role only when sorting rows, not when retrieving them from the db...
[20 Jul 2005 11:34] Marko Mäkelä
The basic SELECT case has lower and upper limits for the key value. So, the SELECT is essentially sorting as well.