mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-4.0
into deer.(none):/home/hf/work/mysql-4.0.674 sql/sql_select.cc: Auto merged
This commit is contained in:
@@ -26,3 +26,13 @@ ORDER BY link;
|
|||||||
key_link_id link
|
key_link_id link
|
||||||
NULL NULL
|
NULL NULL
|
||||||
drop table t1,t2;
|
drop table t1,t2;
|
||||||
|
CREATE TABLE t1 (
|
||||||
|
html varchar(5) default NULL,
|
||||||
|
rin int(11) default '0',
|
||||||
|
out int(11) default '0'
|
||||||
|
) TYPE=MyISAM;
|
||||||
|
INSERT INTO t1 VALUES ('1',1,0);
|
||||||
|
SELECT DISTINCT html,SUM(out)/(SUM(rin)+1) as 'prod' FROM t1 GROUP BY rin;
|
||||||
|
html prod
|
||||||
|
1 0.00
|
||||||
|
drop table t1;
|
||||||
|
@@ -29,3 +29,18 @@ GROUP BY t1.id
|
|||||||
ORDER BY link;
|
ORDER BY link;
|
||||||
|
|
||||||
drop table t1,t2;
|
drop table t1,t2;
|
||||||
|
|
||||||
|
#
|
||||||
|
# test case for #674
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (
|
||||||
|
html varchar(5) default NULL,
|
||||||
|
rin int(11) default '0',
|
||||||
|
out int(11) default '0'
|
||||||
|
) TYPE=MyISAM;
|
||||||
|
|
||||||
|
INSERT INTO t1 VALUES ('1',1,0);
|
||||||
|
|
||||||
|
SELECT DISTINCT html,SUM(out)/(SUM(rin)+1) as 'prod' FROM t1 GROUP BY rin;
|
||||||
|
|
||||||
|
drop table t1;
|
||||||
|
@@ -453,6 +453,9 @@ mysql_select(THD *thd,TABLE_LIST *tables,List<Item> &fields,COND *conds,
|
|||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
thd->proc_info="preparing";
|
thd->proc_info="preparing";
|
||||||
|
|
||||||
|
select_distinct= select_distinct && (join.const_tables != join.tables);
|
||||||
|
|
||||||
if (result->initialize_tables(&join))
|
if (result->initialize_tables(&join))
|
||||||
goto err;
|
goto err;
|
||||||
if (join.const_table_map != join.found_const_table_map &&
|
if (join.const_table_map != join.found_const_table_map &&
|
||||||
|
Reference in New Issue
Block a user