Below is the list of changes that have just been committed into a local
5.0 repository of gluh. When gluh 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.2179 06/06/15 16:24:02 gluh@stripped +3 -0
Fix for bug#19667 group by a decimal expression yields wrong result
sql/item_buff.cc
1.19 06/06/15 16:23:56 gluh@stripped +1 -1
Fix for bug#19667 group by a decimal expression yields wrong result
mysql-test/t/type_newdecimal.test
1.37 06/06/15 16:23:56 gluh@stripped +9 -0
Fix for bug#19667 group by a decimal expression yields wrong result
test case
mysql-test/r/type_newdecimal.result
1.40 06/06/15 16:23:56 gluh@stripped +11 -0
Fix for bug#19667 group by a decimal expression yields wrong result
test case
# 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: gluh
# Host: eagle.intranet.mysql.r18.ru
# Root: /home/gluh/MySQL/Merge/5.0
--- 1.18/sql/item_buff.cc Tue Jul 26 00:46:12 2005
+++ 1.19/sql/item_buff.cc Thu Jun 15 16:23:56 2006
@@ -132,7 +132,7 @@ bool Cached_item_decimal::cmp()
{
my_decimal tmp;
my_decimal *ptmp= item->val_decimal(&tmp);
- if (null_value != item->null_value || my_decimal_cmp(&value, ptmp) == 0)
+ if (null_value != item->null_value || my_decimal_cmp(&value, ptmp))
{
null_value= item->null_value;
my_decimal2decimal(ptmp, &value);
--- 1.39/mysql-test/r/type_newdecimal.result Sat May 13 13:11:37 2006
+++ 1.40/mysql-test/r/type_newdecimal.result Thu Jun 15 16:23:56 2006
@@ -1397,3 +1397,14 @@ c1
9999999999999999999999999999999999999999999999999999999999999999
9999999999999999999999999999999999999999999999999999999999999999
drop table t1;
+create table t1 (i int, j int);
+insert into t1 values (1,1), (1,2), (2,3), (2,4);
+select i, count(distinct j) from t1 group by i;
+i count(distinct j)
+1 2
+2 2
+select i+0.0 as i2, count(distinct j) from t1 group by i2;
+i2 count(distinct j)
+1.0 2
+2.0 2
+drop table t1;
--- 1.36/mysql-test/t/type_newdecimal.test Thu Mar 23 11:21:12 2006
+++ 1.37/mysql-test/t/type_newdecimal.test Thu Jun 15 16:23:56 2006
@@ -1095,3 +1095,12 @@ insert into t1 values(
insert into t1 values(1e100);
select * from t1;
drop table t1;
+
+#
+# Bug#19667 group by a decimal expression yields wrong result
+#
+create table t1 (i int, j int);
+insert into t1 values (1,1), (1,2), (2,3), (2,4);
+select i, count(distinct j) from t1 group by i;
+select i+0.0 as i2, count(distinct j) from t1 group by i2;
+drop table t1;
| Thread |
|---|
| • bk commit into 5.0 tree (gluh:1.2179) BUG#19667 | gluh | 15 Jun |