diff options
author | unknown <jimw@mysql.com> | 2006-05-18 10:34:01 -0700 |
---|---|---|
committer | unknown <jimw@mysql.com> | 2006-05-18 10:34:01 -0700 |
commit | 573d9e47ab9b97209d31b18fc8c21df4e18504e4 (patch) | |
tree | 5fe3339eff5f8f0de92f577987df50fcfbdaf763 /mysql-test/t/func_str.test | |
parent | 741831174722c50feab97a007f58bbce82b52f0a (diff) | |
download | mariadb-git-573d9e47ab9b97209d31b18fc8c21df4e18504e4.tar.gz |
Bug #13975: "same string" + 0 has 2 different results
The 'decimals' member of Item_func was being improperly initialized,
which resulted in improper results when handling large numeric values.
mysql-test/r/func_str.result:
Add test results
mysql-test/t/func_str.test:
Add new regression test
sql/item_strfunc.h:
Remove unnecessary reset of decimals in Item_func_conv::fix_length_and_dec().
Diffstat (limited to 'mysql-test/t/func_str.test')
-rw-r--r-- | mysql-test/t/func_str.test | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test index dee06231deb..7f809dbc4a1 100644 --- a/mysql-test/t/func_str.test +++ b/mysql-test/t/func_str.test @@ -698,4 +698,10 @@ select cast(rtrim(' 20.06 ') as decimal(19,2)); select cast(ltrim(' 20.06 ') as decimal(19,2)); select cast(rtrim(ltrim(' 20.06 ')) as decimal(19,2)); +# +# Bug #13975: "same string" + 0 has 2 different results +# +select conv("18383815659218730760",10,10) + 0; +select "18383815659218730760" + 0; + --echo End of 5.0 tests |