Bug #6610 wrong collation with cp1250_czech_cs
Submitted: 14 Nov 2004 11:46 Modified: 21 Feb 2005 10:10
Reporter: Roman Porizka Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.1.7 OS:Any (any)
Assigned to: Alexander Barkov CPU Architecture:Any

[14 Nov 2004 11:46] Roman Porizka
Description:
When I have collation_connection set to "cp1250_czech_cs", it works not as expected:

SELECT "s" > "S";
  1

SELECT "sa" > "So";
  0

Seems like, it's insensitive on strings, which length is greater then 1.

I think, that result should by:

SELECT "sa" > "So";
  1

This works with collation  latin1_general_cs.

How to repeat:
See description.
[14 Nov 2004 18:24] Roman Porizka
The example above is wrong... I apologize for that... Here's better one:

mysql with cp1250_czech_cs collation thinks, that "S" < "s" < "Sa" < "sa" < "SO" < "So" < "so".

In my opinion, that should be "s" < "S" < "sa" < "Sa" < "so" < "So" < "SO" (as it is in latin2_czech_cs collation).
[10 Feb 2005 12:23] Aleksey Kishkin
Confirm.

tested on linux, mysql 4.1.9-standard and got:

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 4.1.9-standard-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> create table bug6610 (c char(10)) character set cp1250 collate cp1250_czech_cs;
Query OK, 0 rows affected (0.06 sec)

mysql> insert into bug6610 values("s"),("S"),("sa"),("Sa"),("so"),("So"),("SO");
Query OK, 7 rows affected (0.00 sec)
Records: 7  Duplicates: 0  Warnings: 0

mysql> select * from bug6610 order by c;
+------+
| c    |
+------+
| S    |
| s    |
| Sa   |
| sa   |
| SO   |
| So   |
| so   |
+------+
7 rows in set (0.00 sec)

mysql> drop table bug6610;
Query OK, 0 rows affected (0.01 sec)

mysql> create table bug6610 (c char(10)) character set latin2 collate latin2_czech_cs;
Query OK, 0 rows affected (0.03 sec)

mysql> insert into bug6610 values("s"),("S"),("sa"),("Sa"),("so"),("So"),("SO");
Query OK, 7 rows affected (0.00 sec)
Records: 7  Duplicates: 0  Warnings: 0

mysql> select * from bug6610 order by c;
+------+
| c    |
+------+
| s    |
| S    |
| sa   |
| Sa   |
| so   |
| So   |
| SO   |
+------+
7 rows in set (0.01 sec)
[21 Feb 2005 10:10] Alexander Barkov
Hello Roman,
This is not a bug. This is expected behaviour.
The collations work as their authors designed them.
If you need another collation, feel free to post a 
feature request.
[21 Feb 2005 10:34] Roman Porizka
Thanks for advice, i'll post a feature request.