Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
6fb06a7a
Commit
6fb06a7a
authored
Jan 09, 2003
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed order_by test to make it repeatable
parent
aef11cc9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
18 deletions
+18
-18
mysql-test/r/order_by.result
mysql-test/r/order_by.result
+13
-13
mysql-test/t/order_by.test
mysql-test/t/order_by.test
+5
-5
No files found.
mysql-test/r/order_by.result
View file @
6fb06a7a
...
@@ -513,7 +513,7 @@ KEY FieldKey (FieldKey),
...
@@ -513,7 +513,7 @@ KEY FieldKey (FieldKey),
KEY LongField (FieldKey,LongVal),
KEY LongField (FieldKey,LongVal),
KEY StringField (FieldKey,StringVal(32))
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;
EXPLAIN SELECT * FROM t1 WHERE FieldKey = '1' ORDER BY LongVal;
id select_type table type possible_keys key key_len ref rows Extra
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
1 SIMPLE t1 ref FieldKey,LongField,StringField LongField 36 const 2 Using where
...
@@ -522,20 +522,20 @@ FieldKey LongVal StringVal
...
@@ -522,20 +522,20 @@ FieldKey LongVal StringVal
1 0 2
1 0 2
1 1 3
1 1 3
1 2 1
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
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
1 SIMPLE t1 range FieldKey,LongField,StringField FieldKey 36 NULL
4
Using where; Using filesort
SELECT * FROM t1 WHERE FieldKey > '
0
' ORDER BY LongVal;
SELECT * FROM t1 WHERE FieldKey > '
2
' ORDER BY LongVal;
FieldKey LongVal StringVal
FieldKey LongVal StringVal
1 0
2
3 1
2
1 1 3
3 2 1
1 2 1
3 3 3
EXPLAIN SELECT * FROM t1 WHERE FieldKey > '
0
' ORDER BY FieldKey, LongVal;
EXPLAIN SELECT * FROM t1 WHERE FieldKey > '
2
' ORDER BY FieldKey, LongVal;
id select_type table type possible_keys key key_len ref rows Extra
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
1 SIMPLE t1 range FieldKey,LongField,StringField LongField 36 NULL
4
Using where
SELECT * FROM t1 WHERE FieldKey > '
0
' ORDER BY FieldKey, LongVal;
SELECT * FROM t1 WHERE FieldKey > '
2
' ORDER BY FieldKey, LongVal;
FieldKey LongVal StringVal
FieldKey LongVal StringVal
1 0
2
3 1
2
1 1 3
3 2 1
1 2 1
3 3 3
DROP TABLE t1;
DROP TABLE t1;
mysql-test/t/order_by.test
View file @
6fb06a7a
...
@@ -344,11 +344,11 @@ CREATE TABLE t1 (
...
@@ -344,11 +344,11 @@ CREATE TABLE t1 (
KEY
LongField
(
FieldKey
,
LongVal
),
KEY
LongField
(
FieldKey
,
LongVal
),
KEY
StringField
(
FieldKey
,
StringVal
(
32
))
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
;
EXPLAIN
SELECT
*
FROM
t1
WHERE
FieldKey
=
'1'
ORDER
BY
LongVal
;
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
;
EXPLAIN
SELECT
*
FROM
t1
WHERE
FieldKey
>
'
2
'
ORDER
BY
LongVal
;
SELECT
*
FROM
t1
WHERE
FieldKey
>
'
0
'
ORDER
BY
LongVal
;
SELECT
*
FROM
t1
WHERE
FieldKey
>
'
2
'
ORDER
BY
LongVal
;
EXPLAIN
SELECT
*
FROM
t1
WHERE
FieldKey
>
'
0
'
ORDER
BY
FieldKey
,
LongVal
;
EXPLAIN
SELECT
*
FROM
t1
WHERE
FieldKey
>
'
2
'
ORDER
BY
FieldKey
,
LongVal
;
SELECT
*
FROM
t1
WHERE
FieldKey
>
'
0
'
ORDER
BY
FieldKey
,
LongVal
;
SELECT
*
FROM
t1
WHERE
FieldKey
>
'
2
'
ORDER
BY
FieldKey
,
LongVal
;
DROP
TABLE
t1
;
DROP
TABLE
t1
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment