File tree Expand file tree Collapse file tree 3 files changed +34
-6
lines changed Expand file tree Collapse file tree 3 files changed +34
-6
lines changed Original file line number Diff line number Diff line change @@ -224,3 +224,19 @@ CREATE TABLE t1(a YEAR);
224224SELECT 1 FROM t1 WHERE a=1 AND CASE 1 WHEN a THEN 1 ELSE 1 END;
2252251
226226DROP TABLE t1;
227+ #
228+ # Bug#19875294 ASSERTION `SRC' FAILED IN MY_STRNXFRM_UNICODE
229+ # (SIG 6 -STRINGS/CTYPE-UTF8.C:5151)
230+ #
231+ set @@sql_mode='';
232+ CREATE TABLE t1(c1 SET('','')CHARACTER SET ucs2) engine=innodb;
233+ Warnings:
234+ Note 1291 Column 'c1' has duplicated value '' in SET
235+ INSERT INTO t1 VALUES(990101.102);
236+ Warnings:
237+ Warning 1265 Data truncated for column 'c1' at row 1
238+ SELECT COALESCE(c1)FROM t1 ORDER BY 1;
239+ COALESCE(c1)
240+
241+ DROP TABLE t1;
242+ set @@sql_mode=default;
Original file line number Diff line number Diff line change @@ -182,3 +182,15 @@ drop table t1, t2;
182182CREATE TABLE t1(a YEAR);
183183SELECT 1 FROM t1 WHERE a=1 AND CASE 1 WHEN a THEN 1 ELSE 1 END;
184184DROP TABLE t1;
185+
186+ --echo #
187+ --echo # Bug#19875294 ASSERTION `SRC' FAILED IN MY_STRNXFRM_UNICODE
188+ --echo # (SIG 6 -STRINGS/CTYPE-UTF8.C:5151)
189+ --echo #
190+
191+ set @@sql_mode='';
192+ CREATE TABLE t1(c1 SET('','')CHARACTER SET ucs2) engine=innodb;
193+ INSERT INTO t1 VALUES(990101.102);
194+ SELECT COALESCE(c1)FROM t1 ORDER BY 1;
195+ DROP TABLE t1;
196+ set @@sql_mode=default;
Original file line number Diff line number Diff line change 11/*
2- Copyright (c) 2000, 2016 , Oracle and/or its affiliates. All rights reserved.
2+ Copyright (c) 2000, 2017 , Oracle and/or its affiliates. All rights reserved.
33
44 This program is free software; you can redistribute it and/or modify
55 it under the terms of the GNU General Public License as published by
@@ -8691,13 +8691,13 @@ String *Field_set::val_str(String *val_buffer,
86918691 ulonglong tmp=(ulonglong) Field_enum::val_int ();
86928692 uint bitnr=0 ;
86938693
8694+ /*
8695+ Some callers expect *val_buffer to contain the result,
8696+ so we assign to it, rather than doing 'return &empty_set_string.
8697+ */
8698+ *val_buffer= empty_set_string;
86948699 if (tmp == 0 )
86958700 {
8696- /*
8697- Some callers expect *val_buffer to contain the result,
8698- so we assign to it, rather than doing 'return &empty_set_string.
8699- */
8700- *val_buffer= empty_set_string;
87018701 return val_buffer;
87028702 }
87038703
You can’t perform that action at this time.
0 commit comments