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
b70cb552
Commit
b70cb552
authored
Aug 16, 2009
by
Sergey Petrunya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MWL#17: Table elimination
- code cleanup
parent
8c009306
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
9 deletions
+3
-9
sql/opt_table_elimination.cc
sql/opt_table_elimination.cc
+3
-9
No files found.
sql/opt_table_elimination.cc
View file @
b70cb552
...
@@ -125,7 +125,7 @@ public:
...
@@ -125,7 +125,7 @@ public:
make elements that depend on them bound, too.
make elements that depend on them bound, too.
*/
*/
Module_dep
*
next
;
Module_dep
*
next
;
uint
unknown_args
;
/* TRUE<=> The entity is considered bound */
uint
unknown_args
;
Module_dep
()
:
next
(
NULL
),
unknown_args
(
0
)
{}
Module_dep
()
:
next
(
NULL
),
unknown_args
(
0
)
{}
};
};
...
@@ -249,11 +249,9 @@ void run_elimination_wave(Table_elimination *te, Module_dep *bound_modules);
...
@@ -249,11 +249,9 @@ void run_elimination_wave(Table_elimination *te, Module_dep *bound_modules);
void
eliminate_tables
(
JOIN
*
join
);
void
eliminate_tables
(
JOIN
*
join
);
static
void
mark_as_eliminated
(
JOIN
*
join
,
TABLE_LIST
*
tbl
);
static
void
mark_as_eliminated
(
JOIN
*
join
,
TABLE_LIST
*
tbl
);
#if 0
#ifndef DBUG_OFF
#ifndef DBUG_OFF
static
void
dbug_print_deps
(
Table_elimination
*
te
);
static
void
dbug_print_deps
(
Table_elimination
*
te
);
#endif
#endif
#endif
/*******************************************************************************************/
/*******************************************************************************************/
/*
/*
...
@@ -854,7 +852,7 @@ collect_funcdeps_for_join_list(Table_elimination *te,
...
@@ -854,7 +852,7 @@ collect_funcdeps_for_join_list(Table_elimination *te,
/*
/*
This is used to analy
s
e expressions in "tbl.col=expr" dependencies so
This is used to analy
z
e expressions in "tbl.col=expr" dependencies so
that we can figure out which fields the expression depends on.
that we can figure out which fields the expression depends on.
*/
*/
...
@@ -965,7 +963,7 @@ bool setup_equality_deps(Table_elimination *te, Module_dep **bound_deps_list)
...
@@ -965,7 +963,7 @@ bool setup_equality_deps(Table_elimination *te, Module_dep **bound_deps_list)
}
}
*
bound_deps_list
=
bound_dep
;
*
bound_deps_list
=
bound_dep
;
//
DBUG_EXECUTE("test", dbug_print_deps(te); );
DBUG_EXECUTE
(
"test"
,
dbug_print_deps
(
te
);
);
DBUG_RETURN
(
FALSE
);
DBUG_RETURN
(
FALSE
);
}
}
...
@@ -1089,7 +1087,6 @@ static
...
@@ -1089,7 +1087,6 @@ static
void
signal_from_field_to_exprs
(
Table_elimination
*
te
,
Field_value
*
field_dep
,
void
signal_from_field_to_exprs
(
Table_elimination
*
te
,
Field_value
*
field_dep
,
Module_dep
**
bound_modules
)
Module_dep
**
bound_modules
)
{
{
/* Now, expressions */
for
(
uint
i
=
0
;
i
<
te
->
n_equality_deps
;
i
++
)
for
(
uint
i
=
0
;
i
<
te
->
n_equality_deps
;
i
++
)
{
{
if
(
bitmap_is_set
(
&
te
->
expr_deps
,
field_dep
->
bitmap_offset
+
i
)
&&
if
(
bitmap_is_set
(
&
te
->
expr_deps
,
field_dep
->
bitmap_offset
+
i
)
&&
...
@@ -1213,7 +1210,6 @@ void run_elimination_wave(Table_elimination *te, Module_dep *bound_modules)
...
@@ -1213,7 +1210,6 @@ void run_elimination_wave(Table_elimination *te, Module_dep *bound_modules)
for
(
Outer_join_module
*
outer_join_dep
=
table_dep
->
outer_join_dep
;
for
(
Outer_join_module
*
outer_join_dep
=
table_dep
->
outer_join_dep
;
outer_join_dep
;
outer_join_dep
=
outer_join_dep
->
parent
)
outer_join_dep
;
outer_join_dep
=
outer_join_dep
->
parent
)
{
{
//if (!(outer_join_dep->missing_tables &= ~table_dep->table->map))
if
(
outer_join_dep
->
unknown_args
&&
if
(
outer_join_dep
->
unknown_args
&&
!--
outer_join_dep
->
unknown_args
)
!--
outer_join_dep
->
unknown_args
)
{
{
...
@@ -1268,7 +1264,6 @@ static void mark_as_eliminated(JOIN *join, TABLE_LIST *tbl)
...
@@ -1268,7 +1264,6 @@ static void mark_as_eliminated(JOIN *join, TABLE_LIST *tbl)
}
}
#if 0
#ifndef DBUG_OFF
#ifndef DBUG_OFF
static
static
void
dbug_print_deps
(
Table_elimination
*
te
)
void
dbug_print_deps
(
Table_elimination
*
te
)
...
@@ -1323,7 +1318,6 @@ void dbug_print_deps(Table_elimination *te)
...
@@ -1323,7 +1318,6 @@ void dbug_print_deps(Table_elimination *te)
DBUG_VOID_RETURN
;
DBUG_VOID_RETURN
;
}
}
#endif
#endif
#endif
/**
/**
@} (end of group Table_Elimination)
@} (end of group Table_Elimination)
...
...
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