Bug #55971 Adding new collation ended with error "Unknown collation"
Submitted: 13 Aug 2010 14:11 Modified: 15 Aug 2010 8:01
Reporter: Stanislav LOFAJ Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:6.0.11-alpha, 5.5.5, 5.1.49 OS:Any (MS Windows, Linux)
Assigned to: Assigned Account CPU Architecture:Any
Tags: collation, server
Triage: Triaged: D3 (Medium)

[13 Aug 2010 14:11] Stanislav LOFAJ
Description:
When I add new collation utf8_test_ci into server file share\charsets\Index.xml 
an restart mysql server I can find new collation but create table 
with this collation is ending with error "Unknown collation: 'utf8_test_ci'"

How to repeat:
Test Code:
------==========================================================----- 
1. Insert new collation into utf8 section into file share\charsets\Index.xml 
  <collation name="utf8_test_ci"		id="222">
    <rules>
      <reset>A</reset><p>\u00e1</p><t>\u00c1</t><p>\u00e4</p><t>\u00c4</t>
      <reset>C</reset><p>\u010d</p><t>\u010c</t>
      <reset>D</reset><p>\u010f</p><t>\u010e</t><p>dz</p><t>Dz</t><t>DZ</t><p>\u0064\u017e</p><t>\u0044\u017e</t><t>\u0044\u017d</t>
      <reset>E</reset><p>\u00e9</p><t>\u00c9</t>
      <reset>H</reset><p>ch</p><t>Ch</t><t>CH</t>
      <reset>I</reset><p>\u00ed</p><t>\u00cd</t>
      <reset>L</reset><p>\u013a</p><t>\u0139</t><p>\u013e</p><t>\u013d</t>
      <reset>N</reset><p>\u0148</p><t>\u0147</t>
      <reset>O</reset><p>\u00f3</p><t>\u00d3</t><p>\u00f4</p><t>\u00d4</t>
      <reset>R</reset><p>\u0155</p><t>\u0154</t>
      <reset>S</reset><p>\u0161</p><t>\u0160</t>
      <reset>T</reset><p>\u0165</p><t>\u0164</t>
      <reset>U</reset><p>\u00fa</p><t>\u00da</t>
      <reset>Y</reset><p>\u00fd</p><t>\u00dd</t>
      <reset>Z</reset><p>\u017e</p><t>\u017d</t>
    </rules>
  </collation>
2. 
  mysql> SHOW COLLATION like "%test%";
  +--------------+---------+-----+---------+----------+---------+
  | Collation    | Charset | Id  | Default | Compiled | Sortlen |
  +--------------+---------+-----+---------+----------+---------+
  | utf8_test_ci | utf8    | 250 |         |          |       8 |
  +--------------+---------+-----+---------+----------+---------+
  1 row in set (0.00 sec)

3. Create table
  CREATE TABLE sk_test
  (ID INT NOT NULL AUTO_INCREMENT ,
  hodnota VARCHAR( 255 ) CHARACTER SET utf8  COLLATE utf8_test_ci  not null, 
  PRIMARY KEY (ID)
  ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_test_ci ;

Problem is Many-characters-to-one-weight, becouse when i deleted this sequence
<p>\u0064\u017e</p><t>\u0044\u017e</t><t>\u0044\u017d</t>
table was created
[13 Aug 2010 18:20] Sveta Smirnova
Thank you for the report.

Please send us full error log file and output of SHOW COLLATION;
[15 Aug 2010 8:01] Sveta Smirnova
Thank you for the feedback.

Verified as described.

Problem is there is no message in the error log and server shows this invalid collation as supported.