summaryrefslogtreecommitdiff
path: root/mysql-test/t/func_str.test
diff options
context:
space:
mode:
authorunknown <jimw@mysql.com>2006-05-18 10:34:01 -0700
committerunknown <jimw@mysql.com>2006-05-18 10:34:01 -0700
commit573d9e47ab9b97209d31b18fc8c21df4e18504e4 (patch)
tree5fe3339eff5f8f0de92f577987df50fcfbdaf763 /mysql-test/t/func_str.test
parent741831174722c50feab97a007f58bbce82b52f0a (diff)
downloadmariadb-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.test6
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