summaryrefslogtreecommitdiff
path: root/sql/field.cc
diff options
context:
space:
mode:
authorTor Didriksen <tor.didriksen@oracle.com>2017-08-15 13:15:19 +0200
committerTor Didriksen <tor.didriksen@oracle.com>2017-08-23 07:32:49 +0200
commitebd96c314953f5c0073ff5846484fd5e438fe0ad (patch)
treeb463a71d6e66267ea4469c1814a0837b150c1258 /sql/field.cc
parentd75f8a174218fd0ada64222d2a538f7aace897bc (diff)
downloadmariadb-git-ebd96c314953f5c0073ff5846484fd5e438fe0ad.tar.gz
Bug#19875294 ASSERTION `SRC' FAILED IN MY_STRNXFRM_UNICODE (SIG 6 -STRINGS/CTYPE-UTF8.C:5151)
Backport from 5.7 to 5.5 Field_set::val_str() should return String("", 0, cs) rather than String(NULL, 0, cs)
Diffstat (limited to 'sql/field.cc')
-rw-r--r--sql/field.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/sql/field.cc b/sql/field.cc
index 15571afefb8..e98c17fabae 100644
--- a/sql/field.cc
+++ b/sql/field.cc
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -8257,13 +8257,13 @@ String *Field_set::val_str(String *val_buffer,
ulonglong tmp=(ulonglong) Field_enum::val_int();
uint bitnr=0;
+ /*
+ Some callers expect *val_buffer to contain the result,
+ so we assign to it, rather than doing 'return &empty_set_string.
+ */
+ *val_buffer= empty_set_string;
if (tmp == 0)
{
- /*
- Some callers expect *val_buffer to contain the result,
- so we assign to it, rather than doing 'return &empty_set_string.
- */
- *val_buffer= empty_set_string;
return val_buffer;
}