1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Bug#47756 Setting 2byte collation ID with 'set names' crashes the server

The problem is not actually related to 2byte collation IDs.
The same crash happens if you change the collation ID in
mysql-test/str_data/Index.xml to a value smaller than 256.

Crash happened in SQL parser, because the "ident_map" and "state_map"
arrays were not initialized in loadable utf8 collations.

Fix: adding proper initialization of the "ident_map" and "state_map"
members for loadable utf8 collations.
This commit is contained in:
Alexander Barkov
2009-12-07 16:11:53 +04:00
parent 9651888e0e
commit 164c7df5b3
3 changed files with 16 additions and 0 deletions

View File

@ -144,3 +144,11 @@ CREATE TABLE t1 (s1 char(10) character set utf8 collate utf8_maxuserid_ci);
INSERT INTO t1 VALUES ('a'),('b');
SELECT * FROM t1 WHERE s1='a' ORDER BY BINARY s1;
DROP TABLE t1;
#
# Bug#47756 Setting 2byte collation ID with 'set names' crashes the server
#
SET NAMES utf8 COLLATE utf8_phone_ci;
SHOW COLLATION LIKE 'utf8_phone_ci';
SET NAMES utf8;