List:Commits« Previous MessageNext Message »
From:'Hartmut Holzgraefe' Date:May 10 2006 2:18pm
Subject:bk commit into 5.0 tree (hartmut:1.2130) BUG#19667
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of hartmut. When hartmut 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.2130 06/05/10 14:18:37 hartmut@stripped +3 -0
  fix and test case for bug #19667 "group by a decimal expression yields wrong result"

  mysql-test/t/bug19667.test
    1.1 06/05/10 14:18:29 hartmut@stripped +13 -0
    test case for bug #19667

  mysql-test/r/bug19667.result
    1.1 06/05/10 14:18:29 hartmut@stripped +12 -0
    expected test result for bug #19667

  sql/item_buff.cc
    1.19 06/05/10 14:18:29 hartmut@stripped +1 -1
    fix for bug #19667 "group by a decimal expression yields wrong result"

  mysql-test/t/bug19667.test
    1.0 06/05/10 14:18:29 hartmut@stripped +0 -0
    BitKeeper file
/home/hartmut/projects/mysql/dev/5.0-bug19667/mysql-test/t/bug19667.test

  mysql-test/r/bug19667.result
    1.0 06/05/10 14:18:29 hartmut@stripped +0 -0
    BitKeeper file
/home/hartmut/projects/mysql/dev/5.0-bug19667/mysql-test/r/bug19667.result

# 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:	hartmut
# Host:	linux.site
# Root:	/home/hartmut/projects/mysql/dev/5.0-bug19667

--- 1.18/sql/item_buff.cc	2005-07-25 21:46:12 +02:00
+++ 1.19/sql/item_buff.cc	2006-05-10 14:18:29 +02:00
@@ -132,7 +132,7 @@
 {
   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) != 0)
   {
     null_value= item->null_value;
     my_decimal2decimal(ptmp, &value);
--- New file ---
+++ mysql-test/r/bug19667.result	06/05/10 14:18:29
DROP TABLE IF EXISTS 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;

--- New file ---
+++ mysql-test/t/bug19667.test	06/05/10 14:18:29
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings

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 (hartmut:1.2130) BUG#19667'Hartmut Holzgraefe'10 May