summaryrefslogtreecommitdiff
path: root/sql/sql_class.h
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2022-03-15 14:27:04 +0400
committerDaniel Black <daniel@mariadb.org>2022-03-16 12:49:13 +1100
commit0e63023cb8f7e52506241723c105d31051a57820 (patch)
tree969877ac08280a24e683daf523f4bcc180abecac /sql/sql_class.h
parenta9500860367c9ef4ac67c9c41c81dcfad13dc836 (diff)
parent03c3dc63655aabcfc309208188e44c200f680404 (diff)
downloadmariadb-git-0e63023cb8f7e52506241723c105d31051a57820.tar.gz
Merge branch 10.2 into 10.3
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r--sql/sql_class.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h
index 2c43d1a229d..311b47aea61 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -3717,6 +3717,8 @@ public:
bool convert_string(LEX_STRING *to, CHARSET_INFO *to_cs,
const char *from, size_t from_length,
CHARSET_INFO *from_cs);
+ bool reinterpret_string_from_binary(LEX_CSTRING *to, CHARSET_INFO *to_cs,
+ const char *from, size_t from_length);
bool convert_string(LEX_CSTRING *to, CHARSET_INFO *to_cs,
const char *from, size_t from_length,
CHARSET_INFO *from_cs)
@@ -3733,6 +3735,8 @@ public:
{
if (!simple_copy_is_possible)
return unlikely(convert_string(to, tocs, from->str, from->length, fromcs));
+ if (fromcs == &my_charset_bin)
+ return reinterpret_string_from_binary(to, tocs, from->str, from->length);
*to= *from;
return false;
}