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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
e39d06e7
Commit
e39d06e7
authored
Aug 04, 2007
by
igor@olga.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made the test case for bug 28404 platform independent.
parent
3b1dd15e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
21 deletions
+20
-21
mysql-test/r/order_by.result
mysql-test/r/order_by.result
+12
-13
mysql-test/t/order_by.test
mysql-test/t/order_by.test
+8
-8
No files found.
mysql-test/r/order_by.result
View file @
e39d06e7
...
...
@@ -1094,22 +1094,21 @@ UPDATE t1 SET c2=20 WHERE id%100 = 0;
SELECT COUNT(*) FROM t1;
COUNT(*)
40960
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze status OK
EXPLAIN SELECT id,c3 FROM t1 WHERE c2=11 ORDER BY c3 LIMIT 20;
CREATE TABLE t2 LIKE t1;
INSERT INTO t2 SELECT * FROM t1 ORDER BY id;
EXPLAIN SELECT id,c3 FROM t2 WHERE c2=11 ORDER BY c3 LIMIT 20;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t
1 index k2 k3 5 NULL 88
Using where
EXPLAIN SELECT id,c3 FROM t
1
WHERE c2=11 ORDER BY c3 LIMIT 4000;
1 SIMPLE t
2 index k2 k3 5 NULL 111
Using where
EXPLAIN SELECT id,c3 FROM t
2
WHERE c2=11 ORDER BY c3 LIMIT 4000;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t
1 ref k2 k2 5 const 9300
Using where; Using filesort
EXPLAIN SELECT id,c3 FROM t
1
WHERE c2 BETWEEN 10 AND 12 ORDER BY c3 LIMIT 20;
1 SIMPLE t
2 ref k2 k2 5 const 7341
Using where; Using filesort
EXPLAIN SELECT id,c3 FROM t
2
WHERE c2 BETWEEN 10 AND 12 ORDER BY c3 LIMIT 20;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t
1 index k2 k3 5 NULL 6
3 Using where
EXPLAIN SELECT id,c3 FROM t
1
WHERE c2 BETWEEN 20 AND 30 ORDER BY c3 LIMIT 4000;
1 SIMPLE t
2 index k2 k3 5 NULL 7
3 Using where
EXPLAIN SELECT id,c3 FROM t
2
WHERE c2 BETWEEN 20 AND 30 ORDER BY c3 LIMIT 4000;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t
1 range k2 k2 5 NULL 349
Using where; Using filesort
SELECT id,c3 FROM t
1
WHERE c2=11 ORDER BY c3 LIMIT 20;
1 SIMPLE t
2 range k2 k2 5 NULL 386
Using where; Using filesort
SELECT id,c3 FROM t
2
WHERE c2=11 ORDER BY c3 LIMIT 20;
id c3
6 14
16 14
...
...
@@ -1131,4 +1130,4 @@ id c3
176 14
186 14
196 14
DROP TABLE t1;
DROP TABLE t1
,t2
;
mysql-test/t/order_by.test
View file @
e39d06e7
...
...
@@ -766,16 +766,16 @@ INSERT INTO t1 (c2,c3) SELECT c2,c3 FROM t1;
INSERT
INTO
t1
(
c2
,
c3
)
SELECT
c2
,
c3
FROM
t1
;
INSERT
INTO
t1
(
c2
,
c3
)
SELECT
c2
,
c3
FROM
t1
;
UPDATE
t1
SET
c2
=
20
WHERE
id
%
100
=
0
;
SELECT
COUNT
(
*
)
FROM
t1
;
ANALYZE
TABLE
t1
;
CREATE
TABLE
t2
LIKE
t1
;
INSERT
INTO
t2
SELECT
*
FROM
t1
ORDER
BY
id
;
EXPLAIN
SELECT
id
,
c3
FROM
t
1
WHERE
c2
=
11
ORDER
BY
c3
LIMIT
20
;
EXPLAIN
SELECT
id
,
c3
FROM
t
1
WHERE
c2
=
11
ORDER
BY
c3
LIMIT
4000
;
EXPLAIN
SELECT
id
,
c3
FROM
t
1
WHERE
c2
BETWEEN
10
AND
12
ORDER
BY
c3
LIMIT
20
;
EXPLAIN
SELECT
id
,
c3
FROM
t
1
WHERE
c2
BETWEEN
20
AND
30
ORDER
BY
c3
LIMIT
4000
;
EXPLAIN
SELECT
id
,
c3
FROM
t
2
WHERE
c2
=
11
ORDER
BY
c3
LIMIT
20
;
EXPLAIN
SELECT
id
,
c3
FROM
t
2
WHERE
c2
=
11
ORDER
BY
c3
LIMIT
4000
;
EXPLAIN
SELECT
id
,
c3
FROM
t
2
WHERE
c2
BETWEEN
10
AND
12
ORDER
BY
c3
LIMIT
20
;
EXPLAIN
SELECT
id
,
c3
FROM
t
2
WHERE
c2
BETWEEN
20
AND
30
ORDER
BY
c3
LIMIT
4000
;
SELECT
id
,
c3
FROM
t
1
WHERE
c2
=
11
ORDER
BY
c3
LIMIT
20
;
SELECT
id
,
c3
FROM
t
2
WHERE
c2
=
11
ORDER
BY
c3
LIMIT
20
;
DROP
TABLE
t1
;
DROP
TABLE
t1
,
t2
;
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