diff options
author | Sergei Golubchik <serg@mariadb.org> | 2017-07-12 14:21:41 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2017-07-12 17:46:19 +0200 |
commit | 05b678bc8c166c9015ca3dc3ccd9e9c89094f3ca (patch) | |
tree | 059ac1ac8bb651508f7ecdff30170a63431ccd9e /mysql-test/r/group_by.result | |
parent | c83d6ff881dcfd1cc68124a9663c2a31ca7e2dce (diff) | |
download | mariadb-git-05b678bc8c166c9015ca3dc3ccd9e9c89094f3ca.tar.gz |
MDEV-12489 The select stmt may fail due to "having clause is ambiguous" unexpected
only compare field references with an alias (from the SELECT clause)
when this reference doesn't specify an explicit table name part.
Diffstat (limited to 'mysql-test/r/group_by.result')
-rw-r--r-- | mysql-test/r/group_by.result | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result index 2bd3c5c5c3d..7744d98bc11 100644 --- a/mysql-test/r/group_by.result +++ b/mysql-test/r/group_by.result @@ -2545,3 +2545,8 @@ select from t4; ERROR 42S22: Reference 'field7' not supported (reference to group function) drop table t1, t2, t3, t4; +create table t1 (c1 int, c2 int); +create table t2 (c1 int, c2 int); +select t1.c1 as c1, t2.c2 as c1 from t1, t2 where t1.c1 < 20 and t2.c2 > 5 group by t1.c1, t2.c2 having t1.c1 < 3; +c1 c1 +drop table t1, t2; |