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
73510c28
Commit
73510c28
authored
Mar 27, 2011
by
Sergey Petrunya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MWL#90: Switch update_depend_map() back to single loop (so that diff is smaller)
parent
924bdf3e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
23 deletions
+17
-23
sql/sql_select.cc
sql/sql_select.cc
+17
-23
No files found.
sql/sql_select.cc
View file @
73510c28
...
...
@@ -9268,29 +9268,23 @@ only_eq_ref_tables(JOIN *join,ORDER *order,table_map tables)
static
void
update_depend_map
(
JOIN
*
join
)
{
List_iterator
<
JOIN_TAB_RANGE
>
it
(
join
->
join_tab_ranges
);
JOIN_TAB_RANGE
*
jt_range
;
while
((
jt_range
=
it
++
))
{
for
(
JOIN_TAB
*
join_tab
=
jt_range
->
start
;
join_tab
!=
jt_range
->
end
;
join_tab
++
)
{
TABLE_REF
*
ref
=
&
join_tab
->
ref
;
table_map
depend_map
=
0
;
Item
**
item
=
ref
->
items
;
uint
i
;
for
(
i
=
0
;
i
<
ref
->
key_parts
;
i
++
,
item
++
)
depend_map
|=
(
*
item
)
->
used_tables
();
ref
->
depend_map
=
depend_map
&
~
OUTER_REF_TABLE_BIT
;
depend_map
&=
~
OUTER_REF_TABLE_BIT
;
for
(
JOIN_TAB
**
tab
=
join
->
map2table
;
depend_map
;
tab
++
,
depend_map
>>=
1
)
{
if
(
depend_map
&
1
)
ref
->
depend_map
|=
(
*
tab
)
->
ref
.
depend_map
;
}
for
(
JOIN_TAB
*
join_tab
=
first_linear_tab
(
join
,
WITH_CONST_TABLES
);
join_tab
;
join_tab
=
next_linear_tab
(
join
,
join_tab
,
WITH_BUSH_ROOTS
))
{
TABLE_REF
*
ref
=
&
join_tab
->
ref
;
table_map
depend_map
=
0
;
Item
**
item
=
ref
->
items
;
uint
i
;
for
(
i
=
0
;
i
<
ref
->
key_parts
;
i
++
,
item
++
)
depend_map
|=
(
*
item
)
->
used_tables
();
ref
->
depend_map
=
depend_map
&
~
OUTER_REF_TABLE_BIT
;
depend_map
&=
~
OUTER_REF_TABLE_BIT
;
for
(
JOIN_TAB
**
tab
=
join
->
map2table
;
depend_map
;
tab
++
,
depend_map
>>=
1
)
{
if
(
depend_map
&
1
)
ref
->
depend_map
|=
(
*
tab
)
->
ref
.
depend_map
;
}
}
}
...
...
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