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
b23bd7d6
Commit
b23bd7d6
authored
May 30, 2011
by
Sergey Petrunya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Remove compiler warning
- Remove garbage comments
parent
e9dd14fe
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
34 deletions
+6
-34
sql/item_subselect.cc
sql/item_subselect.cc
+2
-11
sql/opt_subselect.cc
sql/opt_subselect.cc
+4
-23
No files found.
sql/item_subselect.cc
View file @
b23bd7d6
...
...
@@ -558,17 +558,6 @@ bool Item_subselect::exec()
}
/*
int Item_subselect::optimize(double *out_rows, double *cost)
{
int res;
DBUG_ASSERT(0);
res= engine->optimize(out_rows, cost);
return res;
}
*/
int
Item_in_subselect
::
optimize
(
double
*
out_rows
,
double
*
cost
)
{
int
res
;
...
...
@@ -616,6 +605,8 @@ int Item_in_subselect::optimize(double *out_rows, double *cost)
DBUG_RETURN
(
res
);
}
/**
Check if an expression cache is needed for this subquery
...
...
sql/opt_subselect.cc
View file @
b23bd7d6
...
...
@@ -598,7 +598,6 @@ bool make_in_exists_conversion(THD *thd, JOIN *join, Item_in_subselect *item)
{
DBUG_ENTER
(
"make_in_exists_conversion"
);
JOIN
*
child_join
=
item
->
unit
->
first_select
()
->
join
;
//Item_subselect::trans_res res;
bool
res
;
/*
...
...
@@ -624,7 +623,6 @@ bool make_in_exists_conversion(THD *thd, JOIN *join, Item_in_subselect *item)
thd
->
lex
->
current_select
=
save_select_lex
;
//if (res == Item_subselect::RES_ERROR)
if
(
res
)
DBUG_RETURN
(
TRUE
);
...
...
@@ -769,18 +767,6 @@ bool convert_join_subqueries_to_semijoins(JOIN *join)
// Temporary measure: disable semi-joins when they are together with outer
// joins.
/*
for (TABLE_LIST *tbl= join->select_lex->leaf_tables; tbl; tbl=tbl->next_leaf)
{
TABLE_LIST *embedding= tbl->embedding;
if (tbl->on_expr || (tbl->embedding && !(embedding->sj_on_expr &&
!embedding->embedding)))
{
in_subq= join->sj_subselects.front();
arena= thd->activate_stmt_arena_if_needed(&backup);
goto skip_conversion;
}
}*/
if
(
check_for_outer_joins
(
join
->
join_list
))
{
in_subq
=
join
->
sj_subselects
.
front
();
...
...
@@ -935,7 +921,8 @@ void get_delayed_table_estimates(TABLE *table,
*
startup_cost
=
item
->
jtbm_read_time
;
/* Calculate cost of scanning the temptable */
double
data_size
=
(
*
out_rows
)
*
hash_sj_engine
->
tmp_table
->
s
->
reclength
;
double
data_size
=
item
->
jtbm_record_count
*
hash_sj_engine
->
tmp_table
->
s
->
reclength
;
/* Do like in handler::read_time */
*
scan_time
=
data_size
/
IO_SIZE
+
2
;
}
...
...
@@ -1353,10 +1340,9 @@ static bool convert_subq_to_jtbm(JOIN *parent_join,
List
<
TABLE_LIST
>
*
emb_join_list
=
&
parent_lex
->
top_join_list
;
TABLE_LIST
*
emb_tbl_nest
=
NULL
;
// will change when we learn to handle outer joins
TABLE_LIST
*
tl
;
DBUG_ENTER
(
"convert_subq_to_jtbm"
);
double
rows
;
double
read_time
;
DBUG_ENTER
(
"convert_subq_to_jtbm"
);
subq_pred
->
in_strategy
&=
~
SUBS_IN_TO_EXISTS
;
subq_pred
->
optimize
(
&
rows
,
&
read_time
);
...
...
@@ -1368,11 +1354,6 @@ static bool convert_subq_to_jtbm(JOIN *parent_join,
if
(
subq_pred
->
engine
->
engine_type
()
!=
subselect_engine
::
HASH_SJ_ENGINE
)
{
*
remove_item
=
FALSE
;
/*
bool res;
res= make_in_exists_conversion(parent_join->thd, parent_join, subq_pred);
DBUG_RETURN(res);
*/
DBUG_RETURN
(
FALSE
);
}
...
...
@@ -3779,7 +3760,7 @@ int setup_semijoin_dups_elimination(JOIN *join, ulonglong options,
SJ_TMP_TABLE
*
sjtbl
;
if
(
jt_rowid_offset
)
/* Temptable has at least one rowid */
{
uin
t
tabs_size
=
(
last_tab
-
sjtabs
)
*
sizeof
(
SJ_TMP_TABLE
::
TAB
);
size_
t
tabs_size
=
(
last_tab
-
sjtabs
)
*
sizeof
(
SJ_TMP_TABLE
::
TAB
);
if
(
!
(
sjtbl
=
(
SJ_TMP_TABLE
*
)
thd
->
alloc
(
sizeof
(
SJ_TMP_TABLE
)))
||
!
(
sjtbl
->
tabs
=
(
SJ_TMP_TABLE
::
TAB
*
)
thd
->
alloc
(
tabs_size
)))
DBUG_RETURN
(
TRUE
);
/* purecov: inspected */
...
...
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