diff options
author | holyfoot@hf-ibm.(none) <> | 2005-06-08 15:49:36 +0500 |
---|---|---|
committer | holyfoot@hf-ibm.(none) <> | 2005-06-08 15:49:36 +0500 |
commit | ff9951f221493632c77d92623ebb431adda9e2d4 (patch) | |
tree | 934ffa52aa1df1de3b1ab029692103e5cee518a1 /mysql-test | |
parent | 71f06aa7782e7775843b1c0f4b83c229c95edb1e (diff) | |
download | mariadb-git-ff9951f221493632c77d92623ebb431adda9e2d4.tar.gz |
Fix for bug #8429 (FORMAT returns incorrect result)
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/func_math.result | 13 | ||||
-rw-r--r-- | mysql-test/t/func_math.test | 12 |
2 files changed, 25 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; diff --git a/mysql-test/t/func_math.test b/mysql-test/t/func_math.test index 0eac72782a8..b21f38052b6 100644 --- a/mysql-test/t/func_math.test +++ b/mysql-test/t/func_math.test @@ -67,3 +67,15 @@ explain extended select degrees(pi()),radians(360); --error 1054 select rand(rand); + +# +# Bug #8459 (FORMAT returns incorrect result) +# +create table t1 (col1 int, col2 decimal(60,30)); +insert into t1 values(1,1234567890.12345); +select format(col2,7) from t1; +select format(col2,8) from t1; +insert into t1 values(7,1234567890123456.12345); +select format(col2,6) from t1 where col1=7; +drop table t1; + |