Commit 2490873f authored by Alexander Barkov's avatar Alexander Barkov

Bug#45645 Mysql server close all connection and restart using lower function

Problem: the "caseinfo" member of CHARSET_INFO structure was not
initialized for user-defined Unicode collations, which made the
server crash.
Fix: initializing caseinfo properly.
parent ce9f6dda
...@@ -41,6 +41,14 @@ efgh efgh ...@@ -41,6 +41,14 @@ efgh efgh
ijkl ijkl ijkl ijkl
DROP TABLE t1; DROP TABLE t1;
# #
# Bug#45645 Mysql server close all connection and restart using lower function
#
CREATE TABLE t1 (a VARCHAR(10)) CHARACTER SET utf8 COLLATE utf8_test_ci;
INSERT INTO t1 (a) VALUES ('hello!');
SELECT * FROM t1 WHERE LOWER(a)=LOWER('N');
a
DROP TABLE t1;
#
# Bug#43827 Server closes connections and restarts # Bug#43827 Server closes connections and restarts
# #
CREATE TABLE t1 (c1 VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_test_ci); CREATE TABLE t1 (c1 VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_test_ci);
......
...@@ -37,6 +37,14 @@ UPDATE t1 SET col2=col1; ...@@ -37,6 +37,14 @@ UPDATE t1 SET col2=col1;
SELECT * FROM t1 WHERE col1=col2 ORDER BY col1; SELECT * FROM t1 WHERE col1=col2 ORDER BY col1;
DROP TABLE t1; DROP TABLE t1;
--echo #
--echo # Bug#45645 Mysql server close all connection and restart using lower function
--echo #
CREATE TABLE t1 (a VARCHAR(10)) CHARACTER SET utf8 COLLATE utf8_test_ci;
INSERT INTO t1 (a) VALUES ('hello!');
SELECT * FROM t1 WHERE LOWER(a)=LOWER('N');
DROP TABLE t1;
--echo # --echo #
--echo # Bug#43827 Server closes connections and restarts --echo # Bug#43827 Server closes connections and restarts
--echo # --echo #
......
...@@ -7858,6 +7858,8 @@ static my_bool create_tailoring(CHARSET_INFO *cs, void *(*alloc)(size_t)) ...@@ -7858,6 +7858,8 @@ static my_bool create_tailoring(CHARSET_INFO *cs, void *(*alloc)(size_t))
return 1; return 1;
} }
cs->caseinfo= my_unicase_default;
if (!(newweights= (uint16**) (*alloc)(256*sizeof(uint16*)))) if (!(newweights= (uint16**) (*alloc)(256*sizeof(uint16*))))
return 1; return 1;
bzero(newweights, 256*sizeof(uint16*)); bzero(newweights, 256*sizeof(uint16*));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment