diff options
author | Alexander Barkov <alexander.barkov@oracle.com> | 2011-03-03 15:04:04 +0300 |
---|---|---|
committer | Alexander Barkov <alexander.barkov@oracle.com> | 2011-03-03 15:04:04 +0300 |
commit | 1bc5e76efb18a5c69f711b4c57a4ff275b187141 (patch) | |
tree | b2bed96b70bcc98347180b84236f71a728abc443 /sql/item_func.cc | |
parent | 165660fd29b1829d03faabd876140d5f29e47048 (diff) | |
download | mariadb-git-1bc5e76efb18a5c69f711b4c57a4ff275b187141.tar.gz |
BUG#11766519 (bug#59648): MY_STRTOLL10_MB2: ASSERTION `(*ENDPTR - S) % 2 == 0' FAILED
Problem: wrong character set pointer was passed to my_strtoll10_mb2,
which led to DBUG_ASSERT failure in some cases.
@ mysql-test/r/func_encrypt_ucs2.result
@ mysql-test/t/func_encrypt_ucs2.test
@ mysql-test/r/ctype_ucs.result
@ mysql-test/t/ctype_ucs.test
Adding tests
@ sql/item_func.cc
"cs" initialization was wrong (res does not necessarily point to &str_value)
@ sql/item_strfunc.cc
Item_func_dec_encrypt::val_str() and Item_func_des_descrypt::val_str()
did not set character set for tmp_value (the returned value),
so the old value, which was previously copied from args[1]->val_str(),
was incorrectly returned with tmp_value.
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r-- | sql/item_func.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc index bffbd03e15a..efae928a8b6 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -840,7 +840,7 @@ longlong Item_func_numhybrid::val_int() return 0; char *end= (char*) res->ptr() + res->length(); - CHARSET_INFO *cs= str_value.charset(); + CHARSET_INFO *cs= res->charset(); return (*(cs->cset->strtoll10))(cs, res->ptr(), &end, &err_not_used); } default: |