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
b90918da
Commit
b90918da
authored
May 21, 2019
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.1 into 10.2
parents
3a871c39
91efcc63
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
sql/sql_select.cc
sql/sql_select.cc
+10
-2
No files found.
sql/sql_select.cc
View file @
b90918da
...
...
@@ -10176,8 +10176,16 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
/*
We plan to scan all rows.
Check again if we should use an index.
We could have used an column from a previous table in
the index if we are using limit and this is the first table
There are two cases:
1) There could be an index usage the refers to a previous
table that we didn't consider before, but could be consider
now as a "last resort". For example
SELECT * from t1,t2 where t1.a between t2.a and t2.b;
2) If the current table is the first non const table
and there is a limit it still possibly beneficial
to use the index even if the index range is big as
we can stop when we've found limit rows.
(1) - Don't switch the used index if we are using semi-join
LooseScan on this table. Using different index will not
...
...
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