Below is the list of changes that have just been committed into a local
5.0 repository of gkodinov. When gkodinov 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@stripped, 2006-10-19 15:04:12+02:00, gkodinov@stripped +3 -0
Merge dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-4.1-opt
into dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.0-opt
MERGE: 1.1616.2144.179
mysql-test/r/olap.result@stripped, 2006-10-19 15:02:59+02:00, gkodinov@stripped +0 -0
SCCS merged
MERGE: 1.11.1.12
mysql-test/t/olap.test@stripped, 2006-10-19 15:04:08+02:00, gkodinov@stripped +0 -1
MERGE: 1.12.1.8
sql/sql_select.cc@stripped, 2006-10-19 14:59:50+02:00, gkodinov@stripped +0 -0
Auto merged
MERGE: 1.216.125.12
# 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: gkodinov
# Host: dl145s.mysql.com
# Root: /data/bk/team_tree_merge/MERGE/mysql-5.0-opt/RESYNC
--- 1.464/sql/sql_select.cc 2006-10-19 15:04:17 +02:00
+++ 1.465/sql/sql_select.cc 2006-10-19 15:04:17 +02:00
@@ -14156,12 +14156,17 @@
while ((item= it++))
{
ORDER *group_tmp;
+ bool found_in_group= 0;
+
for (group_tmp= group_list; group_tmp; group_tmp= group_tmp->next)
{
if (*group_tmp->item == item)
+ {
item->maybe_null= 1;
+ found_in_group= 1;
+ }
}
- if (item->type() == Item::FUNC_ITEM)
+ if (item->type() == Item::FUNC_ITEM && !found_in_group)
{
bool changed= FALSE;
if (change_group_ref(thd, (Item_func *) item, group_list, &changed))
--- 1.34/mysql-test/r/olap.result 2006-10-19 15:04:17 +02:00
+++ 1.35/mysql-test/r/olap.result 2006-10-19 15:04:17 +02:00
@@ -592,6 +592,21 @@
NULL 2
a 1
drop table t1;
+create table t1 (a varchar(22) not null , b int);
+insert into t1 values ("2006-07-01 21:30", 1), ("2006-07-01 23:30", 10);
+select left(a,10), a, sum(b) from t1 group by 1,2 with rollup;
+left(a,10) a sum(b)
+2006-07-01 2006-07-01 21:30 1
+2006-07-01 2006-07-01 23:30 10
+2006-07-01 NULL 11
+NULL NULL 11
+select left(a,10) x, a, sum(b) from t1 group by x,a with rollup;
+x a sum(b)
+2006-07-01 2006-07-01 21:30 1
+2006-07-01 2006-07-01 23:30 10
+2006-07-01 NULL 11
+NULL NULL 11
+drop table t1;
CREATE TABLE t1(id int, type char(1));
INSERT INTO t1 VALUES
(1,"A"),(2,"C"),(3,"A"),(4,"A"),(5,"B"),
--- 1.25/mysql-test/t/olap.test 2006-10-19 15:04:17 +02:00
+++ 1.26/mysql-test/t/olap.test 2006-10-19 15:04:17 +02:00
@@ -283,6 +283,15 @@
select distinct a, max(b) from t1 group by a with rollup;
drop table t1;
+#
+# Bug #20825: rollup puts non-equal values together
+#
+create table t1 (a varchar(22) not null , b int);
+insert into t1 values ("2006-07-01 21:30", 1), ("2006-07-01 23:30", 10);
+select left(a,10), a, sum(b) from t1 group by 1,2 with rollup;
+select left(a,10) x, a, sum(b) from t1 group by x,a with rollup;
+drop table t1;
+
# End of 4.1 tests
#
@@ -318,4 +327,3 @@
DROP VIEW v1;
DROP TABLE t1;
-# End of 4.1 tests
| Thread |
|---|
| • bk commit into 5.0 tree (gkodinov:1.2283) | gkodinov | 19 Oct |