1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fix for sum_func IN (..)

This commit is contained in:
Sinisa@sinisa.nasamreza.org
2002-12-02 14:16:02 +02:00
parent d46dbf535b
commit 757a5faec2
4 changed files with 14 additions and 2 deletions

View File

@ -47,6 +47,11 @@ userid count(*)
3 3
2 1
1 2
userid count(*)
3 3
1 2
userid count(*)
3 3
table type possible_keys key key_len ref rows Extra
t1 range spID spID 5 NULL 2 where used; Using index; Using temporary
table type possible_keys key key_len ref rows Extra

View File

@ -235,6 +235,8 @@ CREATE TABLE t1 (
INSERT INTO t1 VALUES (1,1,1),(2,2,2),(2,1,1),(3,3,3),(4,3,3),(5,3,3);
explain select userid,count(*) from t1 group by userid desc;
select userid,count(*) from t1 group by userid desc;
select userid,count(*) from t1 group by userid desc having (count(*)+1) IN (4,3);
select userid,count(*) from t1 group by userid desc having 3 IN (1,COUNT(*));
explain select spid,count(*) from t1 where spid between 1 and 2 group by spid desc;
explain select spid,count(*) from t1 where spid between 1 and 2 group by spid;
select spid,count(*) from t1 where spid between 1 and 2 group by spid;