List:Internals« Previous MessageNext Message »
From:holyfoot Date:March 7 2005 12:38pm
Subject:bk commit into 5.0 tree (hf:1.1800) BUG#8465
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of hf. When hf does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.1800 05/03/07 16:38:05 hf@deer.(none) +2 -0
  Fix for bug #8465 (MIN, MAX return incorrect result)

  mysql-test/t/func_group.test
    1.37 05/03/07 16:38:01 hf@deer.(none) +13 -0
    testcase added

  mysql-test/r/func_group.result
    1.38 05/03/07 16:38:01 hf@deer.(none) +13 -0
    test result fixed

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	hf
# Host:	deer.(none)
# Root:	/home/hf/work/mysql-5.0.8464

--- 1.37/mysql-test/r/func_group.result	Mon Mar  7 16:07:15 2005
+++ 1.38/mysql-test/r/func_group.result	Mon Mar  7 16:38:01 2005
@@ -842,3 +842,16 @@
 -5.000000000010	4	-20.000000000040	-5.0000000000100000
 -5.000000000000	2	-10.000000000000	-5.0000000000000000
 DROP TABLE t1;
+create table t1 (col1 decimal(16,12));
+insert into t1 values (-5.00000000001);
+insert into t1 values (-5.00000000001);
+select col1,sum(col1),max(col1),min(col1) from t1 group by col1;
+col1	sum(col1)	max(col1)	min(col1)
+-5.000000000010	-10.000000000020	-5.000000000010	-5.000000000010
+delete from t1;
+insert into t1 values (5.00000000001);
+insert into t1 values (5.00000000001);
+select col1,sum(col1),max(col1),min(col1) from t1 group by col1;
+col1	sum(col1)	max(col1)	min(col1)
+5.000000000010	10.000000000020	5.000000000010	5.000000000010
+DROP TABLE t1;

--- 1.36/mysql-test/t/func_group.test	Mon Mar  7 16:07:15 2005
+++ 1.37/mysql-test/t/func_group.test	Mon Mar  7 16:38:01 2005
@@ -548,3 +548,16 @@
 select col1,count(col1),sum(col1),avg(col1) from t1 group by col1;
 DROP TABLE t1;
 
+#
+# BUG#8465 decimal MIN and MAX return incorrect result
+#
+
+create table t1 (col1 decimal(16,12));
+insert into t1 values (-5.00000000001);
+insert into t1 values (-5.00000000001);
+select col1,sum(col1),max(col1),min(col1) from t1 group by col1;
+delete from t1;
+insert into t1 values (5.00000000001);
+insert into t1 values (5.00000000001);
+select col1,sum(col1),max(col1),min(col1) from t1 group by col1;
+DROP TABLE t1;
Thread
bk commit into 5.0 tree (hf:1.1800) BUG#8465holyfoot7 Mar