diff options
author | monty@mysql.com <> | 2005-07-04 03:50:04 +0300 |
---|---|---|
committer | monty@mysql.com <> | 2005-07-04 03:50:04 +0300 |
commit | fe30ec903276029beca788d99a28cb544d7ae528 (patch) | |
tree | 8d29892167ff9d836d0992c219bf4307f1c03b75 /mysql-test/t | |
parent | 75ff7d8085cb5f1a489638a0b419c97fc5a6e9b4 (diff) | |
parent | ec420bfb43b22db63a622d5c4f6498481070bb0c (diff) | |
download | mariadb-git-fe30ec903276029beca788d99a28cb544d7ae528.tar.gz |
manual merge
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/group_by.test | 21 | ||||
-rw-r--r-- | mysql-test/t/information_schema.test | 11 |
2 files changed, 32 insertions, 0 deletions
diff --git a/mysql-test/t/group_by.test b/mysql-test/t/group_by.test index 6845f310843..2defb480deb 100644 --- a/mysql-test/t/group_by.test +++ b/mysql-test/t/group_by.test @@ -543,6 +543,27 @@ 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 diff --git a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test index e03bea5899a..15785a067df 100644 --- a/mysql-test/t/information_schema.test +++ b/mysql-test/t/information_schema.test @@ -101,6 +101,12 @@ where COLLATION_NAME like 'latin1%'; # Test for information_schema.ROUTINES & # +--disable_warnings +drop procedure if exists sel2; +drop function if exists sub1; +drop function if exists sub2; +--enable_warnings + create function sub1(i int) returns int return i+1; delimiter |; @@ -546,6 +552,11 @@ drop database mysqltest; # # Bug #11055 information_schema: routines.sql_data_access has wrong value # +--disable_warnings +drop procedure if exists p1; +drop procedure if exists p2; +--enable_warnings + create procedure p1 () modifies sql data set @a = 5; create procedure p2 () set @a = 5; select sql_data_access from information_schema.routines |