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
c2206d6f
Commit
c2206d6f
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
6ae33523
Changes
2
Hide 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 @
c2206d6f
...
...
@@ -354,7 +354,6 @@ void JOIN_CACHE:: create_remaining_fields(bool all_read_fields)
&
copy_ptr
);
/* 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
)
{
copy
->
str
=
table
->
file
->
ref
;
...
...
@@ -366,7 +365,6 @@ void JOIN_CACHE:: create_remaining_fields(bool all_read_fields)
data_field_count
++
;
copy
++
;
}
*/
}
}
...
...
@@ -1778,10 +1776,8 @@ enum_nested_loop_state JOIN_CACHE_BNL::join_matching_records(bool skip_last)
info
=
&
join_tab
->
read_record
;
do
{
/* !!! NB igor: Enable the code in the comment after backporting the SJ code
if
(
join_tab
->
keep_current_rowid
)
join_tab
->
table
->
file
->
position
(
join_tab
->
table
->
record
[
0
]);
*/
if
(
join
->
thd
->
killed
)
{
...
...
@@ -1913,10 +1909,9 @@ enum_nested_loop_state JOIN_CACHE::generate_full_extensions(uchar *rec_ptr)
if
(
check_match
(
rec_ptr
))
{
int
res
=
0
;
/* !!! NB igor: Enable the code in the comment after backporting the SJ code
if
(
!
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
);
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)
rc
=
NESTED_LOOP_KILLED
;
goto
finish
;
}
/* !!!NB igor: Enable the statement in the comment after backporting the SJ code
if
(
join_tab
->
keep_current_rowid
)
join_tab
->
table
->
file
->
position
(
join_tab
->
table
->
record
[
0
]);
*/
/*
If only the first match is needed and it has been already found
for the associated partial join record then the returned candidate
...
...
sql/sql_select.h
View file @
c2206d6f
...
...
@@ -1197,6 +1197,7 @@ enum_nested_loop_state sub_select(JOIN *join,JOIN_TAB *join_tab, bool
end_of_records
);
enum_nested_loop_state
sub_select_sjm
(
JOIN
*
join
,
JOIN_TAB
*
join_tab
,
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
...
...
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