diff options
author | unknown <evgen@moonbone.local> | 2007-04-24 22:35:57 +0400 |
---|---|---|
committer | unknown <evgen@moonbone.local> | 2007-04-24 22:35:57 +0400 |
commit | 9a86d5a0220bb59be88742247761dfcb10c053aa (patch) | |
tree | cb48f221092ebf6e3cb2393a5ceba97738367e97 /mysql-test/r/group_by.result | |
parent | b4944005c9b8265b620a80ebcf630344db5ab984 (diff) | |
download | mariadb-git-9a86d5a0220bb59be88742247761dfcb10c053aa.tar.gz |
Bug#27874: Non-grouped columns are allowed by * in ONLY_FULL_GROUP_BY mode.
When fields are inserted instead of * in the select list they were not marked
for check for the ONLY_FULL_GROUP_BY mode.
The Field_iterator_table::create_item() function now marks newly created
items for check when in the ONLY_FULL_GROUP_BY mode.
The setup_wild() and the insert_fields() functions now maintain the
cur_pos_in_select_list counter for the ONLY_FULL_GROUP_BY mode.
sql/sql_base.cc:
Bug#27874: Non-grouped columns are allowed by * in ONLY_FULL_GROUP_BY mode.
The setup_wild() and the insert_fields() functions now maintain the
cur_pos_in_select_list counter for the ONLY_FULL_GROUP_BY mode.
sql/table.cc:
Bug#27874: Non-grouped columns are allowed by * in ONLY_FULL_GROUP_BY mode.
The Field_iterator_table::create_item() function now marks newly created
items for check when in the ONLY_FULL_GROUP_BY mode.
mysql-test/r/group_by.result:
Added a test case for the bug#27874: Non-grouped columns are allowed by * in ONLY_FULL_GROUP_BY mode.
mysql-test/t/group_by.test:
Added a test case for the bug#27874: Non-grouped columns are allowed by * in ONLY_FULL_GROUP_BY mode.
Diffstat (limited to 'mysql-test/r/group_by.result')
-rw-r--r-- | mysql-test/r/group_by.result | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result index 97375898f41..88f635595d6 100644 --- a/mysql-test/r/group_by.result +++ b/mysql-test/r/group_by.result @@ -1035,3 +1035,15 @@ HAVING SUM(t1_inner.b)+t1_outer.b > 5); ERROR 42000: 'test.t1_outer.b' isn't in GROUP BY DROP TABLE t1; SET SQL_MODE = ''; +SET SQL_MODE = 'ONLY_FULL_GROUP_BY'; +create table t1(f1 int, f2 int); +select * from t1 group by f1; +ERROR 42000: 'test.t1.f2' isn't in GROUP BY +select * from t1 group by f2; +ERROR 42000: 'test.t1.f1' isn't in GROUP BY +select * from t1 group by f1, f2; +f1 f2 +select t1.f1,t.* from t1, t1 t group by 1; +ERROR 42000: 'test.t.f1' isn't in GROUP BY +drop table t1; +SET SQL_MODE = ''; |