List:Internals« Previous MessageNext Message »
From:igor Date:January 15 2005 9:05am
Subject:bk commit into 4.1 tree (igor:1.2129)
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 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://www.mysql.com/doc/I/n/Installing_source_tree.html

ChangeSet
  1.2129 05/01/15 01:05:00 igor@stripped +3 -0
  func_gconcat.result, func_gconcat.test:
    Added a test case for bug #7769.
  item_sum.h:
    Fixed bug #7769: a crash for queries with group_concat and
    having when the query table was empty.
    The bug was due an unsafe dereferencing.

  mysql-test/r/func_gconcat.result
    1.33 05/01/15 01:04:32 igor@stripped +5 -0
    Added a test case for bug #7769.

  mysql-test/t/func_gconcat.test
    1.24 05/01/15 01:04:11 igor@stripped +7 -0
    Added a test case for bug #7769.

  sql/item_sum.h
    1.77 05/01/15 01:01:29 igor@stripped +3 -2
    Fixed bug #7769: a crash for queries with group_concat and
    having when the query table was empty.
    The bug was due an unsafe dereferencing.

# 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-4.1-0

--- 1.76/sql/item_sum.h	Tue Dec  7 11:18:12 2004
+++ 1.77/sql/item_sum.h	Sat Jan 15 01:01:29 2005
@@ -739,9 +739,10 @@
     String *res;
     char *end_ptr;
     int error;
-    res= val_str(&str_value);
+    if (!(res= val_str(&str_value)))
+      return (longlong) 0;
     end_ptr= (char*) res->ptr()+ res->length();
-    return res ? my_strtoll10(res->ptr(), &end_ptr, &error) : (longlong) 0;
+    return my_strtoll10(res->ptr(), &end_ptr, &error);
   }
   String* val_str(String* str);
   Item *copy_or_same(THD* thd);

--- 1.32/mysql-test/r/func_gconcat.result	Sun Oct 10 00:10:44 2004
+++ 1.33/mysql-test/r/func_gconcat.result	Sat Jan 15 01:04:32 2005
@@ -457,3 +457,8 @@
 Warnings:
 Warning	1260	2 line(s) were cut by GROUP_CONCAT()
 drop table t1;
+CREATE TABLE t1 (id int);
+SELECT GROUP_CONCAT(id) AS gc FROM t1 HAVING gc IS NULL;
+gc
+NULL
+DROP TABLE t1;

--- 1.23/mysql-test/t/func_gconcat.test	Sun Oct 10 00:10:44 2004
+++ 1.24/mysql-test/t/func_gconcat.test	Sat Jan 15 01:04:11 2005
@@ -277,3 +277,10 @@
 select group_concat(distinct b order by b) from t1 group by a;
 
 drop table t1;
+
+#
+# bug #7769: group_concat returning null is checked in having
+#
+CREATE TABLE t1 (id int);
+SELECT GROUP_CONCAT(id) AS gc FROM t1 HAVING gc IS NULL;
+DROP TABLE t1;
Thread
bk commit into 4.1 tree (igor:1.2129)igor15 Jan