diff options
author | unknown <igor@rurik.mysql.com> | 2005-06-21 06:26:02 -0700 |
---|---|---|
committer | unknown <igor@rurik.mysql.com> | 2005-06-21 06:26:02 -0700 |
commit | 109161c3facdb5a439c7a5adead84a595ce6ef3e (patch) | |
tree | 3a37ba1e3973c3635d6222087189524cc24f826d /mysql-test/r/group_by.result | |
parent | bf6a86afcafc559aed642d10da692c94584d258b (diff) | |
parent | 472a2b511c202ee5733aafc63a1083169d769862 (diff) | |
download | mariadb-git-109161c3facdb5a439c7a5adead84a595ce6ef3e.tar.gz |
Manual merge
sql/item_buff.cc:
Auto merged
Diffstat (limited to 'mysql-test/r/group_by.result')
-rw-r--r-- | mysql-test/r/group_by.result | 31 |
1 files changed, 10 insertions, 21 deletions
diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result index 7e1aebac872..0fda8e2b048 100644 --- a/mysql-test/r/group_by.result +++ b/mysql-test/r/group_by.result @@ -723,27 +723,6 @@ WHERE hostname LIKE '%aol%' hostname no cache-dtc-af05.proxy.aol.com 1 DROP TABLE t1; -create table t1 (c1 char(3), c2 char(3)); -create table t2 (c3 char(3), c4 char(3)); -insert into t1 values ('aaa', 'bb1'), ('aaa', 'bb2'); -insert into t2 values ('aaa', 'bb1'), ('aaa', 'bb2'); -select t1.c1 as c2 from t1, t2 where t1.c2 = t2.c4 -group by c2; -c2 -aaa -aaa -Warnings: -Warning 1052 Column 'c2' in group statement is ambiguous -show warnings; -Level Code Message -Warning 1052 Column 'c2' in group statement is ambiguous -select t1.c1 as c2 from t1, t2 where t1.c2 = t2.c4 -group by t1.c1; -c2 -aaa -show warnings; -Level Code Message -drop table t1, t2; CREATE TABLE t1 (a int, b int); INSERT INTO t1 VALUES (1,2), (1,3); SELECT a, b FROM t1 GROUP BY 'const'; @@ -762,3 +741,13 @@ SELECT dt DIV 1 AS f, id FROM t1 GROUP BY f; f id 20050501123000 1 DROP TABLE t1; +CREATE TABLE t1 (id varchar(20) NOT NULL); +INSERT INTO t1 VALUES ('trans1'), ('trans2'); +CREATE TABLE t2 (id varchar(20) NOT NULL, err_comment blob NOT NULL); +INSERT INTO t2 VALUES ('trans1', 'a problem'); +SELECT COUNT(DISTINCT(t1.id)), LEFT(err_comment, 256) AS err_comment +FROM t1 LEFT JOIN t2 ON t1.id=t2.id GROUP BY err_comment; +COUNT(DISTINCT(t1.id)) err_comment +1 NULL +1 a problem +DROP TABLE t1, t2; |