mirror of
https://github.com/MariaDB/server.git
synced 2025-11-05 01:43:31 +03:00
Backporting patch for Bug#47756
from mysql-next-mr-bugfixing into mysql-trunk-bugfixing. NOTE: the "utf8_phone_ci" collation does not exist in mysql-trunk yet, so another collation with 2-byte collation ID is used: "utf8_test_ci". This patch will be null-merged to mysql-next-mr-bugfixing. Original revision: ------------------------------------------------------------ revision-id: bar@mysql.com-20091207121153-hs3bqbmr0719ws21 committer: Alexander Barkov <bar@mysql.com> branch nick: mysql-next-mr.b47756 timestamp: Mon 2009-12-07 16:11:53 +0400 message: 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:
@@ -369,3 +369,8 @@ s1
|
||||
a
|
||||
b
|
||||
DROP TABLE t1;
|
||||
SET NAMES utf8 COLLATE utf8_test_ci;
|
||||
SHOW COLLATION LIKE 'utf8_test_ci';
|
||||
Collation Charset Id Default Compiled Sortlen
|
||||
utf8_test_ci utf8 353 8
|
||||
SET NAMES utf8;
|
||||
|
||||
Reference in New Issue
Block a user