diff options
author | Alexander Barkov <bar@mariadb.com> | 2018-07-24 18:15:15 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2018-07-24 18:15:15 +0400 |
commit | a8227a154306a818685ab291f1715c3971d03099 (patch) | |
tree | 88ac9dee7c8e7df549d2d9d39c83a0d7b9e1b3f7 /sql/item_jsonfunc.cc | |
parent | 45ab00f097be0f77d7087182244218f036c3f113 (diff) | |
download | mariadb-git-a8227a154306a818685ab291f1715c3971d03099.tar.gz |
MDEV-16814 CREATE TABLE SELECT JSON_QUOTE(multibyte_charset_expr) makes a field of a wrong length
Diffstat (limited to 'sql/item_jsonfunc.cc')
-rw-r--r-- | sql/item_jsonfunc.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/item_jsonfunc.cc b/sql/item_jsonfunc.cc index 8103aa906ff..ac0d7e9e6b0 100644 --- a/sql/item_jsonfunc.cc +++ b/sql/item_jsonfunc.cc @@ -575,7 +575,7 @@ bool Item_func_json_quote::fix_length_and_dec() Odd but realistic worst case is when all characters of the argument turn into '\uXXXX\uXXXX', which is 12. */ - max_length= args[0]->max_length * 12 + 2; + fix_char_length_ulonglong((ulonglong) args[0]->max_char_length() * 12 + 2); return FALSE; } |