diff options
author | unknown <ram@mysql.r18.ru> | 2003-01-09 14:35:01 +0400 |
---|---|---|
committer | unknown <ram@mysql.r18.ru> | 2003-01-09 14:35:01 +0400 |
commit | 6fb06a7aca02d04c14cae3b9ee4ef1714ece432c (patch) | |
tree | 3f090cee7105585530663ad7a0c3fe28cc18b417 /mysql-test | |
parent | aef11cc9ba86be713834ce0cb4282d4dcf284b23 (diff) | |
download | mariadb-git-6fb06a7aca02d04c14cae3b9ee4ef1714ece432c.tar.gz |
fixed order_by test to make it repeatable
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/order_by.result | 26 | ||||
-rw-r--r-- | mysql-test/t/order_by.test | 10 |
2 files changed, 18 insertions, 18 deletions
diff --git a/mysql-test/r/order_by.result b/mysql-test/r/order_by.result index 1f6f958b5b0..9bacae92945 100644 --- a/mysql-test/r/order_by.result +++ b/mysql-test/r/order_by.result @@ -513,7 +513,7 @@ KEY FieldKey (FieldKey), KEY LongField (FieldKey,LongVal), KEY StringField (FieldKey,StringVal(32)) ); -INSERT INTO t1 VALUES ('0',3,'0'),('1',2,'1'),('1',1,'3'), ('1',0,'2'); +INSERT INTO t1 VALUES ('0',3,'0'),('0',2,'1'),('0',1,'2'),('1',2,'1'),('1',1,'3'), ('1',0,'2'),('2',3,'0'),('2',2,'1'),('2',1,'2'),('3',2,'1'),('3',1,'2'),('3','3','3'); EXPLAIN SELECT * FROM t1 WHERE FieldKey = '1' ORDER BY LongVal; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref FieldKey,LongField,StringField LongField 36 const 2 Using where @@ -522,20 +522,20 @@ FieldKey LongVal StringVal 1 0 2 1 1 3 1 2 1 -EXPLAIN SELECT * FROM t1 WHERE FieldKey > '0' ORDER BY LongVal; +EXPLAIN SELECT * FROM t1 WHERE FieldKey > '2' ORDER BY LongVal; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range FieldKey,LongField,StringField FieldKey 36 NULL 3 Using where; Using filesort -SELECT * FROM t1 WHERE FieldKey > '0' ORDER BY LongVal; +1 SIMPLE t1 range FieldKey,LongField,StringField FieldKey 36 NULL 4 Using where; Using filesort +SELECT * FROM t1 WHERE FieldKey > '2' ORDER BY LongVal; FieldKey LongVal StringVal -1 0 2 -1 1 3 -1 2 1 -EXPLAIN SELECT * FROM t1 WHERE FieldKey > '0' ORDER BY FieldKey, LongVal; +3 1 2 +3 2 1 +3 3 3 +EXPLAIN SELECT * FROM t1 WHERE FieldKey > '2' ORDER BY FieldKey, LongVal; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range FieldKey,LongField,StringField LongField 36 NULL 3 Using where -SELECT * FROM t1 WHERE FieldKey > '0' ORDER BY FieldKey, LongVal; +1 SIMPLE t1 range FieldKey,LongField,StringField LongField 36 NULL 4 Using where +SELECT * FROM t1 WHERE FieldKey > '2' ORDER BY FieldKey, LongVal; FieldKey LongVal StringVal -1 0 2 -1 1 3 -1 2 1 +3 1 2 +3 2 1 +3 3 3 DROP TABLE t1; diff --git a/mysql-test/t/order_by.test b/mysql-test/t/order_by.test index e87262042bf..c6bc7e9f868 100644 --- a/mysql-test/t/order_by.test +++ b/mysql-test/t/order_by.test @@ -344,11 +344,11 @@ CREATE TABLE t1 ( KEY LongField (FieldKey,LongVal), KEY StringField (FieldKey,StringVal(32)) ); -INSERT INTO t1 VALUES ('0',3,'0'),('1',2,'1'),('1',1,'3'), ('1',0,'2'); +INSERT INTO t1 VALUES ('0',3,'0'),('0',2,'1'),('0',1,'2'),('1',2,'1'),('1',1,'3'), ('1',0,'2'),('2',3,'0'),('2',2,'1'),('2',1,'2'),('3',2,'1'),('3',1,'2'),('3','3','3'); EXPLAIN SELECT * FROM t1 WHERE FieldKey = '1' ORDER BY LongVal; SELECT * FROM t1 WHERE FieldKey = '1' ORDER BY LongVal; -EXPLAIN SELECT * FROM t1 WHERE FieldKey > '0' ORDER BY LongVal; -SELECT * FROM t1 WHERE FieldKey > '0' ORDER BY LongVal; -EXPLAIN SELECT * FROM t1 WHERE FieldKey > '0' ORDER BY FieldKey, LongVal; -SELECT * FROM t1 WHERE FieldKey > '0' ORDER BY FieldKey, LongVal; +EXPLAIN SELECT * FROM t1 WHERE FieldKey > '2' ORDER BY LongVal; +SELECT * FROM t1 WHERE FieldKey > '2' ORDER BY LongVal; +EXPLAIN SELECT * FROM t1 WHERE FieldKey > '2' ORDER BY FieldKey, LongVal; +SELECT * FROM t1 WHERE FieldKey > '2' ORDER BY FieldKey, LongVal; DROP TABLE t1; |