Below is the list of changes that have just been committed into a local
5.0 repository of jani. When jani 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.1930 05/05/06 17:32:46 jani@stripped +3 -0
Fixed bugs 9820, 9799 and 9800.
sql/item_sum.cc
1.141 05/05/06 17:31:24 jani@stripped +6 -1
Fixed bugs 9820, 9799 and 9800.
mysql-test/t/select.test
1.43 05/05/06 17:31:24 jani@stripped +27 -0
Added test cases for bugs 9799, 9800 and 9820
mysql-test/r/select.result
1.57 05/05/06 17:31:24 jani@stripped +21 -0
Added test cases for bugs 9799, 9800 and 9820
# 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: jani
# Host: ibmlab.site
# Root: /home/my/bk/mysql-5.0
--- 1.140/sql/item_sum.cc Thu May 5 18:05:57 2005
+++ 1.141/sql/item_sum.cc Fri May 6 17:31:24 2005
@@ -240,6 +240,8 @@
case REAL_RESULT:
sum= item->sum;
break;
+ case STRING_RESULT: // This can happen with ROLLUP. Note that the value is already
+ break; // copied at function call.
case ROW_RESULT:
default:
DBUG_ASSERT(0);
@@ -585,7 +587,10 @@
DBUG_ENTER("Item_sum_distinct::setup");
- DBUG_ASSERT(tree == 0); /* setup can not be called twice */
+ /*
+ Setup can be called twice for ROLLUP items. This is a bug.
+ Please add DBUG_ASSERT(tree == 0) here when it's fixed.
+ */
/*
Virtual table and the tree are created anew on each re-execution of
--- 1.56/mysql-test/r/select.result Thu May 5 23:01:35 2005
+++ 1.57/mysql-test/r/select.result Fri May 6 17:31:24 2005
@@ -2455,3 +2455,24 @@
select x.a, y.a, z.a from ( (t1 x inner join t2 y on x.a=y.a) inner join t2 z on y.a=z.a) WHERE x.a=1;
a a a
drop table t1,t2;
+create table t1 (s1 varchar(5));
+insert into t1 values ('Wall');
+select min(s1) from t1 group by s1 with rollup;
+min(s1)
+Wall
+Wall
+drop table t1;
+create table t1 (s1 int) engine=myisam;
+insert into t1 values (0);
+select avg(distinct s1) from t1 group by s1 with rollup;
+avg(distinct s1)
+0.0000
+0.0000
+drop table t1;
+create table t1 (s1 int);
+insert into t1 values (null),(1);
+select distinct avg(s1) as x from t1 group by s1 with rollup;
+x
+NULL
+1.0000
+drop table t1;
--- 1.42/mysql-test/t/select.test Sat Apr 2 06:02:07 2005
+++ 1.43/mysql-test/t/select.test Fri May 6 17:31:24 2005
@@ -2029,3 +2029,30 @@
select t1.a from ((t1 inner join t2 on t1.a=t2.a)) where t2.a=1;
select x.a, y.a, z.a from ( (t1 x inner join t2 y on x.a=y.a) inner join t2 z on y.a=z.a) WHERE x.a=1;
drop table t1,t2;
+
+#
+# Bug#9820
+#
+
+create table t1 (s1 varchar(5));
+insert into t1 values ('Wall');
+select min(s1) from t1 group by s1 with rollup;
+drop table t1;
+
+#
+# Bug#9799
+#
+
+create table t1 (s1 int) engine=myisam;
+insert into t1 values (0);
+select avg(distinct s1) from t1 group by s1 with rollup;
+drop table t1;
+
+#
+# Bug#9800
+#
+
+create table t1 (s1 int);
+insert into t1 values (null),(1);
+select distinct avg(s1) as x from t1 group by s1 with rollup;
+drop table t1;
| Thread |
|---|
| • bk commit into 5.0 tree (jani:1.1930) | jani | 10 May |