diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 12:33:02 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 12:33:02 +0000 |
commit | 4fa488fb0159c629483b7994aa84e73926b132b9 (patch) | |
tree | 182a19db69cdcb92be54cc6a5b0b9bfab28f80fd /sql/item_timefunc.cc | |
parent | Adding debian version 1:10.11.6-2. (diff) | |
download | mariadb-4fa488fb0159c629483b7994aa84e73926b132b9.tar.xz mariadb-4fa488fb0159c629483b7994aa84e73926b132b9.zip |
Merging upstream version 1:10.11.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sql/item_timefunc.cc')
-rw-r--r-- | sql/item_timefunc.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index b624a381..db38e44d 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -3080,6 +3080,13 @@ void Item_char_typecast::print(String *str, enum_query_type query_type) { str->append(STRING_WITH_LEN(" charset ")); str->append(cast_cs->cs_name); + /* + Print the "binary" keyword in cases like: + CAST('str' AS CHAR CHARACTER SET latin1 BINARY) + */ + if ((cast_cs->state & MY_CS_BINSORT) && + Charset(cast_cs).can_have_collate_clause()) + str->append(STRING_WITH_LEN(" binary")); } str->append(')'); } |