mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 21:12:26 +01:00
Changed test case for bug 22342 to make it platform independent.
This commit is contained in:
parent
8fd7ea23d6
commit
3a4a9521d8
2 changed files with 4 additions and 4 deletions
|
@ -2143,10 +2143,10 @@ id2 id3 id5 id4 id3 id6 id5 id1
|
|||
1 1 1 1 1 1 1 1
|
||||
DROP TABLE t1,t2,t3,t4,t5,t6;
|
||||
CREATE TABLE t1 (a int, b int, PRIMARY KEY (a,b), KEY b (b));
|
||||
INSERT INTO t1 VALUES (1,1),(1,2);
|
||||
INSERT INTO t1 VALUES (1,1),(1,2),(1,0),(1,3);
|
||||
explain SELECT MAX(b), a FROM t1 WHERE b < 2 AND a = 1 GROUP BY a;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range PRIMARY,b PRIMARY 8 NULL 2 Using where; Using index for group-by
|
||||
1 SIMPLE t1 range PRIMARY,b PRIMARY 8 NULL 1 Using where; Using index for group-by
|
||||
SELECT MAX(b), a FROM t1 WHERE b < 2 AND a = 1 GROUP BY a;
|
||||
MAX(b) a
|
||||
1 1
|
||||
|
@ -2157,7 +2157,7 @@ CREATE TABLE t2 (a int, b int, c int, PRIMARY KEY (a,b,c));
|
|||
INSERT INTO t2 SELECT a,b,b FROM t1;
|
||||
explain SELECT MIN(c) FROM t2 WHERE b = 2 and a = 1 and c > 1 GROUP BY a;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 range PRIMARY PRIMARY 12 NULL 2 Using where; Using index for group-by
|
||||
1 SIMPLE t2 range PRIMARY PRIMARY 12 NULL 1 Using where; Using index for group-by
|
||||
SELECT MIN(c) FROM t2 WHERE b = 2 and a = 1 and c > 1 GROUP BY a;
|
||||
MIN(c)
|
||||
2
|
||||
|
|
|
@ -799,7 +799,7 @@ DROP TABLE t1,t2,t3,t4,t5,t6;
|
|||
# Bug#22342: No results returned for query using max and group by
|
||||
#
|
||||
CREATE TABLE t1 (a int, b int, PRIMARY KEY (a,b), KEY b (b));
|
||||
INSERT INTO t1 VALUES (1,1),(1,2);
|
||||
INSERT INTO t1 VALUES (1,1),(1,2),(1,0),(1,3);
|
||||
|
||||
explain SELECT MAX(b), a FROM t1 WHERE b < 2 AND a = 1 GROUP BY a;
|
||||
SELECT MAX(b), a FROM t1 WHERE b < 2 AND a = 1 GROUP BY a;
|
||||
|
|
Loading…
Reference in a new issue