mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Changed test slightly to make it repeatable
(There was a problem on some AMD system when the floating point precision wasn't accurate enough) mysql-test/r/group_by.result: new test result mysql-test/t/group_by.test: Changed test slightly to make it repeatable
This commit is contained in:
@ -27,6 +27,8 @@ PRIMARY KEY (userID)
|
|||||||
INSERT INTO t2 VALUES (1,'name','pass','mail','Y','v','n','adr','1','1','1');
|
INSERT INTO t2 VALUES (1,'name','pass','mail','Y','v','n','adr','1','1','1');
|
||||||
INSERT INTO t2 VALUES (2,'name','pass','mail','Y','v','n','adr','1','1','1');
|
INSERT INTO t2 VALUES (2,'name','pass','mail','Y','v','n','adr','1','1','1');
|
||||||
INSERT INTO t2 VALUES (3,'name','pass','mail','Y','v','n','adr','1','1','1');
|
INSERT INTO t2 VALUES (3,'name','pass','mail','Y','v','n','adr','1','1','1');
|
||||||
|
INSERT INTO t2 VALUES (4,'name','pass','mail','Y','v','n','adr','1','1','1');
|
||||||
|
INSERT INTO t2 VALUES (5,'name','pass','mail','Y','v','n','adr','1','1','1');
|
||||||
SELECT t2.userid, MIN(t1.score) FROM t1, t2 WHERE t1.userID=t2.userID GROUP BY t2.userid;
|
SELECT t2.userid, MIN(t1.score) FROM t1, t2 WHERE t1.userID=t2.userID GROUP BY t2.userid;
|
||||||
userid MIN(t1.score)
|
userid MIN(t1.score)
|
||||||
1 1
|
1 1
|
||||||
@ -47,12 +49,12 @@ userid MIN(t1.score+0.0)
|
|||||||
2 2.0
|
2 2.0
|
||||||
SELECT t2.userid, MIN(t1.score+0.0) FROM t1, t2 WHERE t1.userID=t2.userID AND t1.spID=2 GROUP BY t2.userid ORDER BY NULL;
|
SELECT t2.userid, MIN(t1.score+0.0) FROM t1, t2 WHERE t1.userID=t2.userID AND t1.spID=2 GROUP BY t2.userid ORDER BY NULL;
|
||||||
userid MIN(t1.score+0.0)
|
userid MIN(t1.score+0.0)
|
||||||
1 1.0
|
|
||||||
2 2.0
|
2 2.0
|
||||||
|
1 1.0
|
||||||
EXPLAIN SELECT t2.userid, MIN(t1.score+0.0) FROM t1, t2 WHERE t1.userID=t2.userID AND t1.spID=2 GROUP BY t2.userid ORDER BY NULL;
|
EXPLAIN SELECT t2.userid, MIN(t1.score+0.0) FROM t1, t2 WHERE t1.userID=t2.userID AND t1.spID=2 GROUP BY t2.userid ORDER BY NULL;
|
||||||
table type possible_keys key key_len ref rows Extra
|
table type possible_keys key key_len ref rows Extra
|
||||||
t1 ALL NULL NULL NULL NULL 4 Using where; Using temporary
|
t1 ALL NULL NULL NULL NULL 4 Using where; Using temporary
|
||||||
t2 index PRIMARY PRIMARY 4 NULL 3 Using where; Using index
|
t2 eq_ref PRIMARY PRIMARY 4 t1.userID 1 Using index
|
||||||
drop table test.t1,test.t2;
|
drop table test.t1,test.t2;
|
||||||
CREATE TABLE t1 (
|
CREATE TABLE t1 (
|
||||||
PID int(10) unsigned NOT NULL auto_increment,
|
PID int(10) unsigned NOT NULL auto_increment,
|
||||||
|
@ -34,6 +34,8 @@ CREATE TABLE t2 (
|
|||||||
INSERT INTO t2 VALUES (1,'name','pass','mail','Y','v','n','adr','1','1','1');
|
INSERT INTO t2 VALUES (1,'name','pass','mail','Y','v','n','adr','1','1','1');
|
||||||
INSERT INTO t2 VALUES (2,'name','pass','mail','Y','v','n','adr','1','1','1');
|
INSERT INTO t2 VALUES (2,'name','pass','mail','Y','v','n','adr','1','1','1');
|
||||||
INSERT INTO t2 VALUES (3,'name','pass','mail','Y','v','n','adr','1','1','1');
|
INSERT INTO t2 VALUES (3,'name','pass','mail','Y','v','n','adr','1','1','1');
|
||||||
|
INSERT INTO t2 VALUES (4,'name','pass','mail','Y','v','n','adr','1','1','1');
|
||||||
|
INSERT INTO t2 VALUES (5,'name','pass','mail','Y','v','n','adr','1','1','1');
|
||||||
|
|
||||||
SELECT t2.userid, MIN(t1.score) FROM t1, t2 WHERE t1.userID=t2.userID GROUP BY t2.userid;
|
SELECT t2.userid, MIN(t1.score) FROM t1, t2 WHERE t1.userID=t2.userID GROUP BY t2.userid;
|
||||||
SELECT t2.userid, MIN(t1.score) FROM t1, t2 WHERE t1.userID=t2.userID GROUP BY t2.userid ORDER BY NULL;
|
SELECT t2.userid, MIN(t1.score) FROM t1, t2 WHERE t1.userID=t2.userID GROUP BY t2.userid ORDER BY NULL;
|
||||||
|
Reference in New Issue
Block a user