diff options
author | unknown <kaa@kaamos.(none)> | 2008-01-19 21:09:22 +0300 |
---|---|---|
committer | unknown <kaa@kaamos.(none)> | 2008-01-19 21:09:22 +0300 |
commit | 8243bdf1a37e43c73dff8054cb735d0bc226e7fe (patch) | |
tree | 74c8bb3c5cc29e998382c2b7310b2082c5b2ec4b /mysql-test/r/group_by.result | |
parent | d9cd56d25f688a3f864c9c72e4dfb28f0c2c54c4 (diff) | |
parent | 5a82c60b01e8f1d89511c8853f03a62d9615580f (diff) | |
download | mariadb-git-8243bdf1a37e43c73dff8054cb735d0bc226e7fe.tar.gz |
Merge kaamos.(none):/data/src/opt/mysql-5.0-opt
into kaamos.(none):/data/src/opt/mysql-5.1-opt
mysql-test/r/group_by.result:
Auto merged
mysql-test/r/type_decimal.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/type_decimal.test:
Auto merged
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_select.cc:
Auto merged
mysql-test/r/subselect.result:
Manual merge.
mysql-test/t/group_by.test:
Manual merge.
mysql-test/t/subselect.test:
Manual merge.
mysql-test/t/view.test:
Manual merge.
Diffstat (limited to 'mysql-test/r/group_by.result')
-rw-r--r-- | mysql-test/r/group_by.result | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result index 268f290ddca..ea50b38ff25 100644 --- a/mysql-test/r/group_by.result +++ b/mysql-test/r/group_by.result @@ -1128,6 +1128,42 @@ id c1 c2 4 2 3 1 5 1 DROP TABLE t1; +CREATE TABLE t1 ( a INT, b INT ); +SELECT b c, (SELECT a FROM t1 WHERE b = c) +FROM t1; +c (SELECT a FROM t1 WHERE b = c) +SELECT b c, (SELECT a FROM t1 WHERE b = c) +FROM t1 +HAVING b = 10; +c (SELECT a FROM t1 WHERE b = c) +SELECT MAX(b) c, (SELECT a FROM t1 WHERE b = c) +FROM t1 +HAVING b = 10; +ERROR 42S22: Reference 'c' not supported (reference to group function) +SET @old_sql_mode = @@sql_mode; +SET @@sql_mode='ONLY_FULL_GROUP_BY'; +SELECT b c, (SELECT a FROM t1 WHERE b = c) +FROM t1; +c (SELECT a FROM t1 WHERE b = c) +SELECT b c, (SELECT a FROM t1 WHERE b = c) +FROM t1 +HAVING b = 10; +ERROR 42000: non-grouping field 'b' is used in HAVING clause +SELECT MAX(b) c, (SELECT a FROM t1 WHERE b = c) +FROM t1 +HAVING b = 10; +ERROR 42S22: Reference 'c' not supported (reference to group function) +INSERT INTO t1 VALUES (1, 1); +SELECT b c, (SELECT a FROM t1 WHERE b = c) +FROM t1; +c (SELECT a FROM t1 WHERE b = c) +1 1 +INSERT INTO t1 VALUES (2, 1); +SELECT b c, (SELECT a FROM t1 WHERE b = c) +FROM t1; +ERROR 21000: Subquery returns more than 1 row +DROP TABLE t1; +SET @@sql_mode = @old_sql_mode; End of 5.0 tests CREATE TABLE t1 (a INT, b INT, PRIMARY KEY (a), |