UPPER/LOWER problems with user defined collation
Posted by: Knut Edelbert
Date: December 20, 2010 04:22AM

I try to add an Unicode Character Set as described in
http://dev.mysql.com/doc/refman/5.0/en/adding-collation-unicode-uca.html.
Everything works fine execpt the "Capital"-Functions LOWER/LCASE and UPPER/UCASE;
The statement
mysql> SELECT LOWER(name) FROM t1;
leads into the following error:

> ERROR 2006 (HY000): MySQL server has gone away
> No connection. Trying to reconnect...
> Connection id: 1
> Current database: test
> ERROR 2013 (HY000): Lost connection to MySQL server during query

On phpmyadmin, the following errors are shown:

> SHOW TABLE STATUS LIKE 't1';
> #2006 - MySQL server has gone away

> INSERT INTO `phpmyadmin`.`pma_history` (
> `username` ,
> `db` ,
> `table` ,
> `timevalue` ,
> `sqlquery`
> )
> VALUES (
> 'webclient', 'test', 't1', NOW( ) , 'SELECT lower(name) FROM `t1`'
> )
> #2006 - MySQL server has gone away

Same results for the UPPER-Function.
The other String-Functions work well.

At first, i tried the utf8_phone_ci Collation. Then i tried an "empty" Collation utf8_test_ci. Both causes the same errors above.

Any Ideas? Is there additional informations for this special String Functions for the Index.xml-file? I couldn't find any information about it.

I use the following version:
Ver 14.12 Distrib 5.0.67, for pc-linux-gnu (i686)

additionally the table and collation-syntax:

-------------------------
CREATE TABLE `t1` (
`name` varchar(80) collate utf8_phone_ci NOT NULL,
PRIMARY KEY (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_phone_ci

test.t1:
+------+
| name |
+------+
| aa |
+------+

information_schema.COLLATIONS:
+----------------+--------------------+-----+------------+-------------+--------+
| COLLATION_NAME | CHARACTER_SET_NAME | ID | IS_DEFAULT | IS_COMPILED | SORTLEN|
+----------------+--------------------+-----+------------+-------------+--------+
| utf8_phone_ci | utf8 | 212 | | | 8 |
| utf8_test_ci | utf8 | 213 | | | 8 |
+----------------+--------------------+-----+------------+-------------+--------+

share/mysql/charsets/Index.xml:
<charset name="utf8">
...
<collation name="utf8_phone_ci" id="212">
<rules>
<reset>\u0000</reset>
<s>\u0020</s> <!-- space -->
<s>\u0028</s> <!-- left parenthesis -->
<s>\u0029</s> <!-- right parenthesis -->
<s>\u002B</s> <!-- plus -->
<s>\u002D</s> <!-- hyphen -->
</rules>
</collation>
<collation name="utf8_test_ci" id="213">
<rules>
</rules>
</collation>
...
-----------------------------

Thanks for any help!

Bye,
Knut

Options: ReplyQuote


Subject
Views
Written By
Posted
UPPER/LOWER problems with user defined collation
6182
December 20, 2010 04:22AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.