diff options
author | Alexander Barkov <alexander.barkov@oracle.com> | 2011-03-03 18:39:26 +0300 |
---|---|---|
committer | Alexander Barkov <alexander.barkov@oracle.com> | 2011-03-03 18:39:26 +0300 |
commit | c82f9661f65ef8729b893e53f715596542101368 (patch) | |
tree | 38604e17050632461c1318bbac41cb32c3d0029b /sql/item_strfunc.h | |
parent | 5956241859975f1057db1f54d8965713cd63f697 (diff) | |
download | mariadb-git-c82f9661f65ef8729b893e53f715596542101368.tar.gz |
Bug 11766519 - 59648: MY_STRTOLL10_MB2: ASSERTION `(*ENDPTR - S) % 2 == 0' FAILED.
Part 2. Function QUOTE() was not multi-byte safe.
@ mysql-test/r/ctype_ucs.result
@ mysql-test/t/ctype_ucs.test
Adding tests
@ sql/item_strfunc.cc
Fixing Item_func_quote::val_str to be multi-byte safe.
@ sql/item_strfunc.h
Multiple size needed for quote characters to mbmaxlen
Diffstat (limited to 'sql/item_strfunc.h')
-rw-r--r-- | sql/item_strfunc.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h index 408062ddc08..3cf9f283d39 100644 --- a/sql/item_strfunc.h +++ b/sql/item_strfunc.h @@ -704,9 +704,10 @@ public: String *val_str(String *); void fix_length_and_dec() { - ulonglong max_result_length= (ulonglong) args[0]->max_length * 2 + 2; - max_length= (uint32) min(max_result_length, MAX_BLOB_WIDTH); collation.set(args[0]->collation); + ulonglong max_result_length= (ulonglong) args[0]->max_length * 2 + + 2 * collation.collation->mbmaxlen; + max_length= (uint32) min(max_result_length, MAX_BLOB_WIDTH); } }; |