diff options
author | unknown <holyfoot@hf-ibm.(none)> | 2005-06-08 15:49:36 +0500 |
---|---|---|
committer | unknown <holyfoot@hf-ibm.(none)> | 2005-06-08 15:49:36 +0500 |
commit | 4408350b51278b085533050f4ad5ef59955baccd (patch) | |
tree | 934ffa52aa1df1de3b1ab029692103e5cee518a1 /mysql-test/r/func_math.result | |
parent | b5755ae60b2fac28f450edd64b1e98249d8660d8 (diff) | |
download | mariadb-git-4408350b51278b085533050f4ad5ef59955baccd.tar.gz |
Fix for bug #8429 (FORMAT returns incorrect result)
mysql-test/r/func_math.result:
test result ixed
mysql-test/t/func_math.test:
test case added
sql/item_strfunc.cc:
Item_func_format::val_str now handles 'decimal' and 'double' values in
different way
Diffstat (limited to 'mysql-test/r/func_math.result')
-rw-r--r-- | mysql-test/r/func_math.result | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/r/func_math.result b/mysql-test/r/func_math.result index 0798a034c3e..e4889289c18 100644 --- a/mysql-test/r/func_math.result +++ b/mysql-test/r/func_math.result @@ -130,3 +130,16 @@ Warnings: Note 1003 select degrees(pi()) AS `degrees(pi())`,radians(360) AS `radians(360)` select rand(rand); ERROR 42S22: Unknown column 'rand' in 'field list' +create table t1 (col1 int, col2 decimal(60,30)); +insert into t1 values(1,1234567890.12345); +select format(col2,7) from t1; +format(col2,7) +1,234,567,890.1234500 +select format(col2,8) from t1; +format(col2,8) +1,234,567,890.12345000 +insert into t1 values(7,1234567890123456.12345); +select format(col2,6) from t1 where col1=7; +format(col2,6) +1,234,567,890,123,456.123450 +drop table t1; |