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);
224
224
SELECT 1 FROM t1 WHERE a=1 AND CASE 1 WHEN a THEN 1 ELSE 1 END;
225
225
1
226
226
DROP 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;
182
182
CREATE TABLE t1(a YEAR);
183
183
SELECT 1 FROM t1 WHERE a=1 AND CASE 1 WHEN a THEN 1 ELSE 1 END;
184
184
DROP 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 1
1
/*
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.
3
3
4
4
This program is free software; you can redistribute it and/or modify
5
5
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,
8691
8691
ulonglong tmp=(ulonglong) Field_enum::val_int ();
8692
8692
uint bitnr=0 ;
8693
8693
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;
8694
8699
if (tmp == 0 )
8695
8700
{
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;
8701
8701
return val_buffer;
8702
8702
}
8703
8703
You can’t perform that action at this time.
0 commit comments