diff options
author | unknown <gkodinov/kgeorge@macbook.gmz> | 2006-08-10 16:45:02 +0300 |
---|---|---|
committer | unknown <gkodinov/kgeorge@macbook.gmz> | 2006-08-10 16:45:02 +0300 |
commit | d3dd6fa0084d6c89b71cb7d700a164a9f6e0da87 (patch) | |
tree | 08930b60207d2c18d8cacb4cfddc123087266207 /mysql-test/r/func_gconcat.result | |
parent | 84ece59cefafc7a223c65aa7c763f5e72afaa1fc (diff) | |
download | mariadb-git-d3dd6fa0084d6c89b71cb7d700a164a9f6e0da87.tar.gz |
Bug #16792 query with subselect, join, and group not returning proper values
Treat queries with no FROM and aggregate functions as normal queries,
so the aggregate function get correctly calculated as if there is 1 row.
This means that they will be considered to have one row, so COUNT(*) will return
1 instead of 0. Other aggregates will behave in compatible manner.
mysql-test/r/func_gconcat.result:
Bug #16792 query with subselect, join, and group not returning proper values
- test case. Note how it improves the support for DUAL.
mysql-test/r/func_group.result:
Bug #16792 query with subselect, join, and group not returning proper values
- test case. Note how it improves the support for DUAL.
mysql-test/r/subselect.result:
Bug #16792 query with subselect, join, and group not returning proper values
- consequence of (SELECT MAX(<const>)) now returning <const> instead of 0
mysql-test/t/func_group.test:
Bug #16792 query with subselect, join, and group not returning proper values
- test case.
sql/opt_sum.cc:
Bug #16792 query with subselect, join, and group not returning proper values
- cannot do the optimization if the index is already opened by (say) UPDATE
as it invloves opening reading and closing the index.
sql/sql_select.cc:
Bug #16792 query with subselect, join, and group not returning proper values
- Treat queries with no FROM and aggregate functions as normal queries,
so the aggregate function get correctly calculated as if there is 1 row.
Diffstat (limited to 'mysql-test/r/func_gconcat.result')
-rw-r--r-- | mysql-test/r/func_gconcat.result | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mysql-test/r/func_gconcat.result b/mysql-test/r/func_gconcat.result index 2c79b8f8ab1..db0125b7d4f 100644 --- a/mysql-test/r/func_gconcat.result +++ b/mysql-test/r/func_gconcat.result @@ -559,14 +559,14 @@ COUNT(*) GROUP_CONCAT(DISTINCT t2.somename SEPARATOR ' |') DROP TABLE t1,t2; select * from (select group_concat('c') from DUAL) t; group_concat('c') -NULL +c create table t1 ( a int not null default 0); select * from (select group_concat(a) from t1) t2; group_concat(a) NULL select group_concat('x') UNION ALL select 1; group_concat('x') -NULL +x 1 drop table t1; CREATE TABLE t1 (id int, a varchar(9)); |