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
58e6db45
Commit
58e6db45
authored
Mar 22, 2011
by
Sergey Petrunya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MWL#90: Address review feedback part #6: more clearer code in next_linear_tab() function
parent
4dbb76b8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
5 deletions
+15
-5
sql/sql_select.cc
sql/sql_select.cc
+15
-5
No files found.
sql/sql_select.cc
View file @
58e6db45
...
@@ -6389,21 +6389,31 @@ JOIN_TAB *first_linear_tab(JOIN *join, bool after_const_tables)
...
@@ -6389,21 +6389,31 @@ JOIN_TAB *first_linear_tab(JOIN *join, bool after_const_tables)
JOIN_TAB
*
next_linear_tab
(
JOIN
*
join
,
JOIN_TAB
*
tab
,
bool
include_bush_roots
)
JOIN_TAB
*
next_linear_tab
(
JOIN
*
join
,
JOIN_TAB
*
tab
,
bool
include_bush_roots
)
{
{
if
(
include_bush_roots
&&
tab
->
bush_children
)
if
(
include_bush_roots
&&
tab
->
bush_children
)
{
/* This JOIN_TAB is a SJM nest; Start from first table in nest */
return
tab
->
bush_children
->
start
;
return
tab
->
bush_children
->
start
;
}
DBUG_ASSERT
(
!
tab
->
last_leaf_in_bush
||
tab
->
bush_root_tab
);
DBUG_ASSERT
(
!
tab
->
last_leaf_in_bush
||
tab
->
bush_root_tab
);
if
(
tab
->
last_leaf_in_bush
)
tab
=
tab
->
bush_root_tab
;
if
(
tab
->
bush_root_tab
)
if
(
tab
->
bush_root_tab
)
/* Are we inside an SJM nest */
return
++
tab
;
{
/* Inside SJM nest */
if
(
!
tab
->
last_leaf_in_bush
)
return
tab
+
1
;
/* Return next in nest */
/* Continue from the sjm on the top level */
tab
=
tab
->
bush_root_tab
;
}
/* If no more JOIN_TAB's on the top level */
if
(
++
tab
==
join
->
join_tab
+
join
->
top_jtrange_tables
)
if
(
++
tab
==
join
->
join_tab
+
join
->
top_jtrange_tables
)
return
NULL
;
return
NULL
;
if
(
!
include_bush_roots
&&
tab
->
bush_children
)
if
(
!
include_bush_roots
&&
tab
->
bush_children
)
{
/* This JOIN_TAB is a SJM nest; Start from first table in nest */
tab
=
tab
->
bush_children
->
start
;
tab
=
tab
->
bush_children
->
start
;
}
return
tab
;
return
tab
;
}
}
...
...
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