summaryrefslogtreecommitdiff
path: root/mysql-test/t/select.test
diff options
context:
space:
mode:
authorunknown <gkodinov@mysql.com>2006-07-06 13:18:05 +0300
committerunknown <gkodinov@mysql.com>2006-07-06 13:18:05 +0300
commit8e354677a81580fc7bd1ba4e3f6c7c426ed08c42 (patch)
tree2e3ef4ddaedcb26307cc9412256ab6f787169763 /mysql-test/t/select.test
parent3cf92fb7d67b22f33f4846ecf68c3f56c301cc20 (diff)
downloadmariadb-git-8e354677a81580fc7bd1ba4e3f6c7c426ed08c42.tar.gz
Bug #20569 Garbage in DECIMAL results from some mathematical functions
Adding decimal "digits" in multiplication resulted in signed overflow and producing wrong results. Fixed by using large enough buffers and intermediary result types : dec2 (currently longlong) to hold result of adding decimal "digits" (currently int32). mysql-test/r/select.result: Bug #20569 Garbage in DECIMAL results from some mathematical functions * test suite for the bug mysql-test/t/select.test: Bug #20569 Garbage in DECIMAL results from some mathematical functions * test suite for the bug strings/decimal.c: Bug #20569 Garbage in DECIMAL results from some mathematical functions * fixed the overflow in adding decimal "digits"
Diffstat (limited to 'mysql-test/t/select.test')
-rw-r--r--mysql-test/t/select.test5
1 files changed, 5 insertions, 0 deletions
diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test
index b75d0dd8bb6..b44f682c02e 100644
--- a/mysql-test/t/select.test
+++ b/mysql-test/t/select.test
@@ -2901,3 +2901,8 @@ from t1 left outer join t2 on t1.a = t2.c and t2.b <> 1
where t1.b <> 1 order by t1.a;
drop table t1,t2;
+
+#
+# Bug #20569: Garbage in DECIMAL results from some mathematical functions
+#
+SELECT 0.9888889889 * 1.011111411911;