mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
Bug#43827 Server closes connections and restarts
Problem: Crash happened with a user-defined utf8 collation, on attempt to insert a value longer than the column to store. Reason: The "ctype" member was not initialized (NULL) when allocating a user-defined utf8 collation, so an attempt to call my_ctype(cs, *str) to check if we loose any important data when truncating the value made the server crash. Fix: Initializing tge "ctype" member to a proper value. mysql-test/r/ctype_ldml.result Adding tests mysql-test/t/ctype_ldml.test Adding tests strings/ctype-uca.c Adding initialization of "ctype" member. modified: mysql-test/r/ctype_ldml.result mysql-test/t/ctype_ldml.test strings/ctype-uca.c
This commit is contained in:
@@ -40,6 +40,14 @@ abcd abcd
|
||||
efgh efgh
|
||||
ijkl ijkl
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#43827 Server closes connections and restarts
|
||||
#
|
||||
CREATE TABLE t1 (c1 VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_test_ci);
|
||||
INSERT INTO t1 SELECT REPEAT('a',11);
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'c1' at row 1
|
||||
DROP TABLE t1;
|
||||
show collation like 'ucs2_vn_ci';
|
||||
Collation Charset Id Default Compiled Sortlen
|
||||
ucs2_vn_ci ucs2 242 8
|
||||
|
Reference in New Issue
Block a user