diff options
author | Alexander Barkov <bar@mysql.com> | 2009-06-04 14:35:29 +0500 |
---|---|---|
committer | Alexander Barkov <bar@mysql.com> | 2009-06-04 14:35:29 +0500 |
commit | 00792d37810c27bc320c0eacc2c9cad1f5d4efec (patch) | |
tree | fa1662dd6b0f2049fed909d113209d0d4aaf5283 /strings | |
parent | 9379a4e0c07b4a7039d9a5225433d4ab64353aac (diff) | |
download | mariadb-git-00792d37810c27bc320c0eacc2c9cad1f5d4efec.tar.gz |
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
Diffstat (limited to 'strings')
-rw-r--r-- | strings/ctype-uca.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/strings/ctype-uca.c b/strings/ctype-uca.c index 1ed758bc105..2ea48ddab2f 100644 --- a/strings/ctype-uca.c +++ b/strings/ctype-uca.c @@ -7992,6 +7992,7 @@ static my_bool create_tailoring(CHARSET_INFO *cs, void *(*alloc)(size_t)) static my_bool my_coll_init_uca(CHARSET_INFO *cs, void *(*alloc)(size_t)) { cs->pad_char= ' '; + cs->ctype= my_charset_utf8_unicode_ci.ctype; return create_tailoring(cs, alloc); } |