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
d764108a
Commit
d764108a
authored
Jun 26, 2009
by
Sergey Petrunia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MWL#17: Table elimination
- Better comments, variable/function renames
parent
15f964b6
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
145 additions
and
103 deletions
+145
-103
sql/opt_table_elimination.cc
sql/opt_table_elimination.cc
+139
-99
sql/sql_select.cc
sql/sql_select.cc
+4
-3
sql/sql_select.h
sql/sql_select.h
+2
-1
No files found.
sql/opt_table_elimination.cc
View file @
d764108a
This diff is collapsed.
Click to expand it.
sql/sql_select.cc
View file @
d764108a
...
...
@@ -16699,10 +16699,11 @@ static void print_join(THD *thd,
{
TABLE_LIST
*
curr
=
*
tbl
;
/*
The (*) check guards againist the case of printing the query for
CREATE VIEW. There we'll have nested_join->used_tables==0.
The "eliminated_tables &&" check guards againist the case of
printing the query for CREATE VIEW. We do that without having run
JOIN::optimize() and so will have nested_join->used_tables==0.
*/
if
(
eliminated_tables
&&
// (*)
if
(
eliminated_tables
&&
((
curr
->
table
&&
(
curr
->
table
->
map
&
eliminated_tables
))
||
(
curr
->
nested_join
&&
!
(
curr
->
nested_join
->
used_tables
&
~
eliminated_tables
))))
...
...
sql/sql_select.h
View file @
d764108a
...
...
@@ -300,7 +300,8 @@ public:
*/
bool
resume_nested_loop
;
table_map
const_table_map
,
found_const_table_map
;
/* Tables removed by table elimination. Set to 0 before the elimination. */
table_map
eliminated_tables
;
/*
Bitmap of all inner tables from outer joins
...
...
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