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
742afd8e
Commit
742afd8e
authored
Jan 19, 2010
by
Sergey Petrunya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Subquery optimizations: Backport into 5.3:
- Enable semi-join handling in the join cache code
parent
085e8b69
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
8 deletions
+2
-8
sql/sql_join_cache.cc
sql/sql_join_cache.cc
+1
-8
sql/sql_select.h
sql/sql_select.h
+1
-0
No files found.
sql/sql_join_cache.cc
View file @
742afd8e
...
@@ -354,7 +354,6 @@ void JOIN_CACHE:: create_remaining_fields(bool all_read_fields)
...
@@ -354,7 +354,6 @@ void JOIN_CACHE:: create_remaining_fields(bool all_read_fields)
&
copy_ptr
);
&
copy_ptr
);
/* SemiJoinDuplicateElimination: allocate space for rowid if needed */
/* SemiJoinDuplicateElimination: allocate space for rowid if needed */
/* !!! NB igor: Enable the code in the comment after backporting the SJ code
if
(
tab
->
keep_current_rowid
)
if
(
tab
->
keep_current_rowid
)
{
{
copy
->
str
=
table
->
file
->
ref
;
copy
->
str
=
table
->
file
->
ref
;
...
@@ -366,7 +365,6 @@ void JOIN_CACHE:: create_remaining_fields(bool all_read_fields)
...
@@ -366,7 +365,6 @@ void JOIN_CACHE:: create_remaining_fields(bool all_read_fields)
data_field_count
++
;
data_field_count
++
;
copy
++
;
copy
++
;
}
}
*/
}
}
}
}
...
@@ -1778,10 +1776,8 @@ enum_nested_loop_state JOIN_CACHE_BNL::join_matching_records(bool skip_last)
...
@@ -1778,10 +1776,8 @@ enum_nested_loop_state JOIN_CACHE_BNL::join_matching_records(bool skip_last)
info
=
&
join_tab
->
read_record
;
info
=
&
join_tab
->
read_record
;
do
do
{
{
/* !!! NB igor: Enable the code in the comment after backporting the SJ code
if
(
join_tab
->
keep_current_rowid
)
if
(
join_tab
->
keep_current_rowid
)
join_tab
->
table
->
file
->
position
(
join_tab
->
table
->
record
[
0
]);
join_tab
->
table
->
file
->
position
(
join_tab
->
table
->
record
[
0
]);
*/
if
(
join
->
thd
->
killed
)
if
(
join
->
thd
->
killed
)
{
{
...
@@ -1913,10 +1909,9 @@ enum_nested_loop_state JOIN_CACHE::generate_full_extensions(uchar *rec_ptr)
...
@@ -1913,10 +1909,9 @@ enum_nested_loop_state JOIN_CACHE::generate_full_extensions(uchar *rec_ptr)
if
(
check_match
(
rec_ptr
))
if
(
check_match
(
rec_ptr
))
{
{
int
res
=
0
;
int
res
=
0
;
/* !!! NB igor: Enable the code in the comment after backporting the SJ code
if
(
!
join_tab
->
check_weed_out_table
||
if
(
!
join_tab
->
check_weed_out_table
||
!
(
res
=
do_sj_dups_weedout
(
join
->
thd
,
join_tab
->
check_weed_out_table
)))
!
(
res
=
do_sj_dups_weedout
(
join
->
thd
,
join_tab
->
check_weed_out_table
)))
*/
{
{
set_curr_rec_link
(
rec_ptr
);
set_curr_rec_link
(
rec_ptr
);
rc
=
(
join_tab
->
next_select
)(
join
,
join_tab
+
1
,
0
);
rc
=
(
join_tab
->
next_select
)(
join
,
join_tab
+
1
,
0
);
...
@@ -2291,10 +2286,8 @@ enum_nested_loop_state JOIN_CACHE_BKA::join_matching_records(bool skip_last)
...
@@ -2291,10 +2286,8 @@ enum_nested_loop_state JOIN_CACHE_BKA::join_matching_records(bool skip_last)
rc
=
NESTED_LOOP_KILLED
;
rc
=
NESTED_LOOP_KILLED
;
goto
finish
;
goto
finish
;
}
}
/* !!!NB igor: Enable the statement in the comment after backporting the SJ code
if
(
join_tab
->
keep_current_rowid
)
if
(
join_tab
->
keep_current_rowid
)
join_tab
->
table
->
file
->
position
(
join_tab
->
table
->
record
[
0
]);
join_tab
->
table
->
file
->
position
(
join_tab
->
table
->
record
[
0
]);
*/
/*
/*
If only the first match is needed and it has been already found
If only the first match is needed and it has been already found
for the associated partial join record then the returned candidate
for the associated partial join record then the returned candidate
...
...
sql/sql_select.h
View file @
742afd8e
...
@@ -1197,6 +1197,7 @@ enum_nested_loop_state sub_select(JOIN *join,JOIN_TAB *join_tab, bool
...
@@ -1197,6 +1197,7 @@ enum_nested_loop_state sub_select(JOIN *join,JOIN_TAB *join_tab, bool
end_of_records
);
end_of_records
);
enum_nested_loop_state
sub_select_sjm
(
JOIN
*
join
,
JOIN_TAB
*
join_tab
,
enum_nested_loop_state
sub_select_sjm
(
JOIN
*
join
,
JOIN_TAB
*
join_tab
,
bool
end_of_records
);
bool
end_of_records
);
int
do_sj_dups_weedout
(
THD
*
thd
,
SJ_TMP_TABLE
*
sjtbl
);
/**
/**
Information about a position of table within a join order. Used in join
Information about a position of table within a join order. Used in join
...
...
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