diff options
author | unknown <igor@rurik.mysql.com> | 2006-05-18 13:17:59 -0700 |
---|---|---|
committer | unknown <igor@rurik.mysql.com> | 2006-05-18 13:17:59 -0700 |
commit | 41e6fb25905de41e4b24a02e4fddd82cadb8fa1e (patch) | |
tree | e3b8787b52e4c5dc168bf9dc16b19a33cad97b58 | |
parent | 33c439ce5814b17fbe18d7b4c4e88d6789d851ee (diff) | |
parent | 573d9e47ab9b97209d31b18fc8c21df4e18504e4 (diff) | |
download | mariadb-git-41e6fb25905de41e4b24a02e4fddd82cadb8fa1e.tar.gz |
Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-5.0
into rurik.mysql.com:/home/igor/mysql-5.0
-rw-r--r-- | mysql-test/r/func_str.result | 6 | ||||
-rw-r--r-- | mysql-test/t/func_str.test | 6 | ||||
-rw-r--r-- | sql/item_strfunc.h | 2 |
3 files changed, 13 insertions, 1 deletions
diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result index 6f8269bdcbd..a17661d26d0 100644 --- a/mysql-test/r/func_str.result +++ b/mysql-test/r/func_str.result @@ -1046,4 +1046,10 @@ cast(ltrim(' 20.06 ') as decimal(19,2)) select cast(rtrim(ltrim(' 20.06 ')) as decimal(19,2)); cast(rtrim(ltrim(' 20.06 ')) as decimal(19,2)) 20.06 +select conv("18383815659218730760",10,10) + 0; +conv("18383815659218730760",10,10) + 0 +1.8383815659219e+19 +select "18383815659218730760" + 0; +"18383815659218730760" + 0 +1.8383815659219e+19 End of 5.0 tests 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 diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h index 7d7b62df0dc..90d421a2c68 100644 --- a/sql/item_strfunc.h +++ b/sql/item_strfunc.h @@ -542,7 +542,7 @@ public: void fix_length_and_dec() { collation.set(default_charset()); - decimals=0; max_length=64; + max_length= 64; } }; |