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
d539aaff
Commit
d539aaff
authored
Oct 07, 2019
by
Varun Gupta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor fix for duplicate weedout
parent
23476afd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
6 deletions
+27
-6
sql/opt_subselect.cc
sql/opt_subselect.cc
+25
-5
sql/sql_sort_nest.cc
sql/sql_sort_nest.cc
+2
-1
No files found.
sql/opt_subselect.cc
View file @
d539aaff
...
...
@@ -3958,10 +3958,8 @@ void fix_semijoin_strategies_for_picked_join_order(JOIN *join)
for
(
uint
i
=
first
;
i
<
i_end
;
i
++
)
{
if
(
i
!=
first
)
{
join
->
best_positions
[
i
].
sj_strategy
=
SJ_OPT_NONE
;
DBUG_ASSERT
(
!
join
->
best_positions
[
i
].
sort_nest_operation_here
);
}
handled_tabs
|=
join
->
best_positions
[
i
].
table
->
table
->
map
;
}
...
...
@@ -5151,8 +5149,28 @@ int setup_semijoin_dups_elimination(JOIN *join, ulonglong options,
}
}
init_dups_weedout
(
join
,
first_table
,
i
,
i
+
pos
->
n_sj_tables
-
first_table
);
i
+=
pos
->
n_sj_tables
;
bool
sort_nest_present
=
FALSE
;
/*
Walk through the range and remember
- tables that need their rowids to be put into temptable
- the last outer table
*/
if
(
join
->
sort_nest_needed
())
{
for
(
JOIN_TAB
*
j
=
tab
;
j
<
tab
+
pos
->
n_sj_tables
;
j
++
)
{
if
(
j
->
is_sort_nest
)
{
sort_nest_present
=
TRUE
;
break
;
}
}
}
init_dups_weedout
(
join
,
first_table
,
i
,
i
+
pos
->
n_sj_tables
+
MY_TEST
(
sort_nest_present
)
-
first_table
);
i
+=
pos
->
n_sj_tables
+
MY_TEST
(
sort_nest_present
);
pos
+=
pos
->
n_sj_tables
;
break
;
}
...
...
@@ -5307,6 +5325,8 @@ static bool sj_table_is_included(JOIN *join, JOIN_TAB *join_tab)
{
if
(
join_tab
->
emb_sj_nest
)
return
FALSE
;
if
(
join_tab
->
is_sort_nest
)
return
FALSE
;
/* Check if this table is functionally dependent on the tables that
are within the same outer join nest
...
...
sql/sql_sort_nest.cc
View file @
d539aaff
...
...
@@ -1418,7 +1418,8 @@ bool JOIN::sort_nest_allowed()
select_lex
->
agg_func_used
()
||
select_limit
==
HA_POS_ERROR
||
thd
->
lex
->
sql_command
!=
SQLCOM_SELECT
||
select_lex
->
uncacheable
&
UNCACHEABLE_DEPENDENT
);
select_lex
->
uncacheable
&
UNCACHEABLE_DEPENDENT
||
MY_TEST
(
select_options
&
SELECT_STRAIGHT_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