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
92faf41d
Commit
92faf41d
authored
Oct 09, 2019
by
Varun Gupta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding more test coverage
parent
d1e9d213
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
0 deletions
+34
-0
mysql-test/main/sort_nest.result
mysql-test/main/sort_nest.result
+20
-0
mysql-test/main/sort_nest.test
mysql-test/main/sort_nest.test
+14
-0
No files found.
mysql-test/main/sort_nest.result
View file @
92faf41d
...
@@ -2278,6 +2278,26 @@ ORDER BY t1.b LIMIT 10;
...
@@ -2278,6 +2278,26 @@ ORDER BY t1.b LIMIT 10;
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 a,a_b a_b 5 const 3 Using index condition; Using where
1 SIMPLE t1 ref a,a_b a_b 5 const 3 Using index condition; Using where
1 SIMPLE t2 ref b,c b 5 test.t1.b 1 Using where
1 SIMPLE t2 ref b,c b 5 test.t1.b 1 Using where
#
# Using index condition should not be present
#
SELECT * FROM t1,t2
WHERE
t1.a=2 AND t2.c >= 1 AND
t1.b=t2.b
ORDER BY t1.b DESC LIMIT 10;
a b c a b c
2 10 4 2 10 4
2 9 3 2 9 3
2 8 2 2 8 2
EXPLAIN SELECT * FROM t1,t2
WHERE
t1.a=2 AND t2.c >= 1 AND
t1.b=t2.b
ORDER BY t1.b DESC LIMIT 10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref a,a_b a_b 5 const 3 Using where
1 SIMPLE t2 ref b,c b 5 test.t1.b 1 Using where
drop table t1,t2;
drop table t1,t2;
# TESTS with INDEX HINTS
# TESTS with INDEX HINTS
create table t0 (a int);
create table t0 (a int);
...
...
mysql-test/main/sort_nest.test
View file @
92faf41d
...
@@ -909,6 +909,20 @@ ORDER BY t1.b LIMIT 10;
...
@@ -909,6 +909,20 @@ ORDER BY t1.b LIMIT 10;
eval
$query
;
eval
$query
;
eval
EXPLAIN
$query
;
eval
EXPLAIN
$query
;
--
echo
#
--
echo
# Using index condition should not be present
--
echo
#
let
$query
=
SELECT
*
FROM
t1
,
t2
WHERE
t1
.
a
=
2
AND
t2
.
c
>=
1
AND
t1
.
b
=
t2
.
b
ORDER
BY
t1
.
b
DESC
LIMIT
10
;
eval
$query
;
eval
EXPLAIN
$query
;
drop
table
t1
,
t2
;
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