List:Commits« Previous MessageNext Message »
From:igor Date:January 8 2006 7:10am
Subject:bk commit into 5.0 tree (igor:1.2022)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of igor. When igor 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.2022 06/01/07 23:10:08 igor@stripped +3 -0
  Merge rurik.mysql.com:/home/igor/dev/mysql-4.1-0
  into  rurik.mysql.com:/home/igor/dev/mysql-5.0-0

  sql/sql_select.cc
    1.379 06/01/07 23:10:03 igor@stripped +1 -2
    Manual merge.

  mysql-test/r/having.result
    1.18 06/01/07 23:10:03 igor@stripped +0 -0
    Manual merge.

  mysql-test/t/having.test
    1.17 06/01/07 23:04:52 igor@stripped +0 -0
    Auto merged

# 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:	igor
# Host:	rurik.mysql.com
# Root:	/home/igor/dev/mysql-5.0-0/RESYNC

--- 1.378/sql/sql_select.cc	2006-01-05 14:49:24 -08:00
+++ 1.379/sql/sql_select.cc	2006-01-07 23:10:03 -08:00
@@ -365,7 +365,7 @@
     if (having_fix_rc || thd->net.report_error)
       DBUG_RETURN(-1);				/* purecov: inspected */
     if (having->with_sum_func)
-      having->split_sum_func(thd, ref_pointer_array, all_fields);
+      having->split_sum_func2(thd, ref_pointer_array, all_fields, &having);
     thd->lex->allow_sum_func= save_allow_sum_func;
   }
   if (select_lex->inner_sum_func_list)

--- 1.17/mysql-test/r/having.result	2005-06-15 00:12:44 -07:00
+++ 1.18/mysql-test/r/having.result	2006-01-07 23:10:03 -08:00
@@ -128,6 +128,19 @@
 1	test	0
 2	test2	0
 drop table t1,t2,t3;
+CREATE TABLE t1 (a int);
+INSERT INTO t1 VALUES (3), (4), (1), (3), (1);
+SELECT SUM(a) FROM t1 GROUP BY a HAVING SUM(a)>0;
+SUM(a)
+2
+6
+4
+SELECT SUM(a) FROM t1 GROUP BY a HAVING SUM(a);
+SUM(a)
+2
+6
+4
+DROP TABLE t1;
 create table t1 (col1 int, col2 varchar(5), col_t1 int);
 create table t2 (col1 int, col2 varchar(5), col_t2 int);
 create table t3 (col1 int, col2 varchar(5), col_t3 int);

--- 1.16/mysql-test/t/having.test	2005-07-28 07:09:48 -07:00
+++ 1.17/mysql-test/t/having.test	2006-01-07 23:04:52 -08:00
@@ -123,6 +123,18 @@
 having (a.description is not null) and (c=0);
 drop table t1,t2,t3;
 
+#
+# Bug #14274: HAVING clause containing only set function
+#
+
+CREATE TABLE t1 (a int);
+INSERT INTO t1 VALUES (3), (4), (1), (3), (1);
+
+SELECT SUM(a) FROM t1 GROUP BY a HAVING SUM(a)>0;
+SELECT SUM(a) FROM t1 GROUP BY a HAVING SUM(a);
+
+DROP TABLE t1;
+
 # End of 4.1 tests
 
 #
Thread
bk commit into 5.0 tree (igor:1.2022)igor8 Jan