diff options
author | unknown <monty@mysql.com> | 2005-07-04 16:01:04 +0300 |
---|---|---|
committer | unknown <monty@mysql.com> | 2005-07-04 16:01:04 +0300 |
commit | 5d82b41e3adccc566b68542bf5be097ed45f5390 (patch) | |
tree | 5d98db8559f519e7aac489fe047ee7fb3f2b8d3b /mysql-test/t/group_by.test | |
parent | 3c82f72091d2c21519540ee5bcc3b2acadfbf198 (diff) | |
download | mariadb-git-5d82b41e3adccc566b68542bf5be097ed45f5390.tar.gz |
After merge fixes
mysql-test/r/group_by.result:
After merge fix
(Put test in same order as in 4.1)
mysql-test/t/group_by.test:
After merge fix
(Put test in same order as in 4.1)
sql/item_cmpfunc.cc:
After merge fix (+ simple fix to not allow compiler to do tail optimization)
sql/item_cmpfunc.h:
After merge fix
Diffstat (limited to 'mysql-test/t/group_by.test')
-rw-r--r-- | mysql-test/t/group_by.test | 68 |
1 files changed, 35 insertions, 33 deletions
diff --git a/mysql-test/t/group_by.test b/mysql-test/t/group_by.test index 2defb480deb..6f1880ae8fb 100644 --- a/mysql-test/t/group_by.test +++ b/mysql-test/t/group_by.test @@ -543,39 +543,6 @@ SELECT hostname, COUNT(DISTINCT user_id) as no FROM t1 DROP TABLE t1; # -# Bug#11211: Ambiguous column reference in GROUP BY. -# - -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'); - -# query with ambiguous column reference 'c2' ---disable_ps_protocol -select t1.c1 as c2 from t1, t2 where t1.c2 = t2.c4 -group by c2; -show warnings; ---enable_ps_protocol - -# this query has no ambiguity -select t1.c1 as c2 from t1, t2 where t1.c2 = t2.c4 -group by t1.c1; - -show warnings; -drop table t1, t2; - -# -# Test for bug #11414: crash on Windows for a simple GROUP BY query -# - -CREATE TABLE t1 (n int); -INSERT INTO t1 VALUES (1); ---disable_ps_protocol -SELECT n+1 AS n FROM t1 GROUP BY n; ---enable_ps_protocol -DROP TABLE t1; - # Test for bug #8614: GROUP BY 'const' with DISTINCT # @@ -613,3 +580,38 @@ SELECT COUNT(DISTINCT(t1.id)), LEFT(err_comment, 256) AS comment FROM t1 LEFT JOIN t2 ON t1.id=t2.id GROUP BY comment; DROP TABLE t1, t2; + +# +# Test for bug #11414: crash on Windows for a simple GROUP BY query +# + +CREATE TABLE t1 (n int); +INSERT INTO t1 VALUES (1); +--disable_ps_protocol +SELECT n+1 AS n FROM t1 GROUP BY n; +--enable_ps_protocol +DROP TABLE t1; + +# +# Bug#11211: Ambiguous column reference in GROUP BY. +# + +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'); + +# query with ambiguous column reference 'c2' +--disable_ps_protocol +select t1.c1 as c2 from t1, t2 where t1.c2 = t2.c4 +group by c2; +show warnings; +--enable_ps_protocol + +# this query has no ambiguity +select t1.c1 as c2 from t1, t2 where t1.c2 = t2.c4 +group by t1.c1; + +show warnings; +drop table t1, t2; + |