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
9ea0b44c
Commit
9ea0b44c
authored
Jan 18, 2017
by
Oleksandr Byelkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Such big blocks in query processing should be represented in the debugging trace.
parent
08413254
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
sql/sql_derived.cc
sql/sql_derived.cc
+8
-7
No files found.
sql/sql_derived.cc
View file @
9ea0b44c
...
...
@@ -1129,23 +1129,24 @@ bool mysql_derived_reinit(THD *thd, LEX *lex, TABLE_LIST *derived)
bool
pushdown_cond_for_derived
(
THD
*
thd
,
Item
*
cond
,
TABLE_LIST
*
derived
)
{
DBUG_ENTER
(
"pushdown_cond_for_derived"
);
if
(
!
cond
)
return
false
;
DBUG_RETURN
(
false
)
;
st_select_lex_unit
*
unit
=
derived
->
get_unit
();
st_select_lex
*
sl
=
unit
->
first_select
();
/* Do not push conditions into constant derived */
if
(
unit
->
executed
)
return
false
;
DBUG_RETURN
(
false
)
;
/* Do not push conditions into recursive with tables */
if
(
derived
->
is_recursive_with_table
())
return
false
;
DBUG_RETURN
(
false
)
;
/* Do not push conditions into unit with global ORDER BY ... LIMIT */
if
(
unit
->
fake_select_lex
&&
unit
->
fake_select_lex
->
explicit_limit
)
return
false
;
DBUG_RETURN
(
false
)
;
/* Check whether any select of 'unit' allows condition pushdown */
bool
some_select_allows_cond_pushdown
=
false
;
...
...
@@ -1158,7 +1159,7 @@ bool pushdown_cond_for_derived(THD *thd, Item *cond, TABLE_LIST *derived)
}
}
if
(
!
some_select_allows_cond_pushdown
)
return
false
;
DBUG_RETURN
(
false
);
/*
Build the most restrictive condition extractable from 'cond'
...
...
@@ -1173,7 +1174,7 @@ bool pushdown_cond_for_derived(THD *thd, Item *cond, TABLE_LIST *derived)
if
(
!
extracted_cond
)
{
/* Nothing can be pushed into the derived table */
return
false
;
DBUG_RETURN
(
false
)
;
}
/* Push extracted_cond into every select of the unit specifying 'derived' */
st_select_lex
*
save_curr_select
=
thd
->
lex
->
current_select
;
...
...
@@ -1257,6 +1258,6 @@ bool pushdown_cond_for_derived(THD *thd, Item *cond, TABLE_LIST *derived)
sl
->
cond_pushed_into_having
=
extracted_cond_copy
;
}
thd
->
lex
->
current_select
=
save_curr_select
;
return
false
;
DBUG_RETURN
(
false
)
;
}
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