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
13e98578
Commit
13e98578
authored
Jun 04, 2012
by
Sergey Petrunya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added comments about create_ref_for_key()
parent
a8b2e831
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
sql/sql_select.cc
sql/sql_select.cc
+7
-0
No files found.
sql/sql_select.cc
View file @
13e98578
...
@@ -7941,6 +7941,13 @@ static bool create_ref_for_key(JOIN *join, JOIN_TAB *j,
...
@@ -7941,6 +7941,13 @@ static bool create_ref_for_key(JOIN *join, JOIN_TAB *j,
if
(
keyuse
->
null_rejecting
)
if
(
keyuse
->
null_rejecting
)
j
->
ref
.
null_rejecting
|=
1
<<
i
;
j
->
ref
.
null_rejecting
|=
1
<<
i
;
keyuse_uses_no_tables
=
keyuse_uses_no_tables
&&
!
keyuse
->
used_tables
;
keyuse_uses_no_tables
=
keyuse_uses_no_tables
&&
!
keyuse
->
used_tables
;
/*
Todo: we should remove this check for thd->lex->describe on the next
line. With SHOW EXPLAIN code, EXPLAIN printout code no longer depends
on it. However, removing the check caused change in lots of query
plans! Does the optimizer depend on the contents of
table_ref->key_copy ? If yes, do we produce incorrect EXPLAINs?
*/
if
(
!
keyuse
->
val
->
used_tables
()
&&
!
thd
->
lex
->
describe
)
if
(
!
keyuse
->
val
->
used_tables
()
&&
!
thd
->
lex
->
describe
)
{
// Compare against constant
{
// Compare against constant
store_key_item
tmp
(
thd
,
store_key_item
tmp
(
thd
,
...
...
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