Bug #5024 Server crashes with queries on fields with certain charset/collation settings
Submitted: 12 Aug 2004 23:58 Modified: 13 Aug 2004 8:20
Reporter: Hartmut Holzgraefe Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:4.1.3 OS:Linux (Linux)
Assigned to: Alexander Barkov CPU Architecture:Any

[12 Aug 2004 23:58] Hartmut Holzgraefe
Description:
For some charset/collation combinations 
the server crashes on simple queries 
instead of reporting "Illegal mix of collations"

How to repeat:
create table collation_test_138 (s1 char character set `ucs2` collate `ucs2_czech_ci`);
select * from t101 where s1 > 'a';

it also happens with the following table definitions:

create table collation_test_128 (s1 char character set `ucs2` collate `ucs2_unicode_ci`)
create table collation_test_130 (s1 char character set `ucs2` collate `ucs2_latvian_ci`)
create table collation_test_132 (s1 char character set `ucs2` collate `ucs2_slovenian_ci`)
create table collation_test_133 (s1 char character set `ucs2` collate `ucs2_polish_ci`)
create table collation_test_134 (s1 char character set `ucs2` collate `ucs2_estonian_ci`)
create table collation_test_135 (s1 char character set `ucs2` collate `ucs2_spanish_ci`)
create table collation_test_136 (s1 char character set `ucs2` collate `ucs2_swedish_ci`)
create table collation_test_137 (s1 char character set `ucs2` collate `ucs2_turkish_ci`)
create table collation_test_138 (s1 char character set `ucs2` collate `ucs2_czech_ci`)
create table collation_test_139 (s1 char character set `ucs2` collate `ucs2_danish_ci`)
create table collation_test_140 (s1 char character set `ucs2` collate `ucs2_lithuanian_ci`)
create table collation_test_142 (s1 char character set `ucs2` collate `ucs2_spanish2_ci`)
create table collation_test_143 (s1 char character set `ucs2` collate `ucs2_roman_ci`)
[13 Aug 2004 8:20] Alexander Barkov
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

I fixed server crash.

Note, it should not give "llegal mix of collations" because we do allow
automatic character set if the strong, according to coercibility rules,
comparand is Unicode (utf8 or ucs2).

So, now it produces results.