diff options
Diffstat (limited to 'mysql-test/t/sel000100.test')
-rw-r--r-- | mysql-test/t/sel000100.test | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/t/sel000100.test b/mysql-test/t/sel000100.test index 2f9c06d5cf4..c9923d178c6 100644 --- a/mysql-test/t/sel000100.test +++ b/mysql-test/t/sel000100.test @@ -31,3 +31,18 @@ GROUP BY t1.id ORDER BY link; 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; |