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
de4a3c2a
Commit
de4a3c2a
authored
Jul 31, 2014
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-6312 HA_MUST_USE_TABLE_CONDITION_PUSHDOWN is not accounted by init_read_record()
parent
c39a501c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
13 deletions
+8
-13
sql/records.cc
sql/records.cc
+1
-3
sql/sql_class.h
sql/sql_class.h
+5
-0
sql/sql_select.cc
sql/sql_select.cc
+2
-10
No files found.
sql/records.cc
View file @
de4a3c2a
...
@@ -287,9 +287,7 @@ bool init_read_record(READ_RECORD *info,THD *thd, TABLE *table,
...
@@ -287,9 +287,7 @@ bool init_read_record(READ_RECORD *info,THD *thd, TABLE *table,
thd
->
variables
.
read_buff_size
);
thd
->
variables
.
read_buff_size
);
}
}
/* Condition pushdown to storage engine */
/* Condition pushdown to storage engine */
if
((
thd
->
variables
.
optimizer_switch
&
if
(
thd
->
use_cond_push
(
table
->
file
)
&&
select
&&
select
->
cond
&&
OPTIMIZER_SWITCH_ENGINE_CONDITION_PUSHDOWN
)
&&
select
&&
select
->
cond
&&
(
select
->
cond
->
used_tables
()
&
table
->
map
)
&&
(
select
->
cond
->
used_tables
()
&
table
->
map
)
&&
!
table
->
file
->
pushed_cond
)
!
table
->
file
->
pushed_cond
)
table
->
file
->
cond_push
(
select
->
cond
);
table
->
file
->
cond_push
(
select
->
cond
);
...
...
sql/sql_class.h
View file @
de4a3c2a
...
@@ -2894,6 +2894,11 @@ class THD :public Statement,
...
@@ -2894,6 +2894,11 @@ class THD :public Statement,
// End implementation of MDL_context_owner interface.
// End implementation of MDL_context_owner interface.
inline
bool
use_cond_push
(
handler
*
file
)
{
return
(
variables
.
optimizer_switch
&
OPTIMIZER_SWITCH_ENGINE_CONDITION_PUSHDOWN
)
||
(
file
->
ha_table_flags
()
&
HA_MUST_USE_TABLE_CONDITION_PUSHDOWN
);
}
inline
bool
is_strict_mode
()
const
inline
bool
is_strict_mode
()
const
{
{
return
(
bool
)
(
variables
.
sql_mode
&
(
MODE_STRICT_TRANS_TABLES
|
return
(
bool
)
(
variables
.
sql_mode
&
(
MODE_STRICT_TRANS_TABLES
|
...
...
sql/sql_select.cc
View file @
de4a3c2a
...
@@ -9530,11 +9530,7 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
...
@@ -9530,11 +9530,7 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
if
(
tab
->
table
)
if
(
tab
->
table
)
{
{
tab
->
table
->
file
->
pushed_cond
=
NULL
;
tab
->
table
->
file
->
pushed_cond
=
NULL
;
if
(((
thd
->
variables
.
optimizer_switch
&
if
(
thd
->
use_cond_push
(
tab
->
table
->
file
)
&&
!
first_inner_tab
)
OPTIMIZER_SWITCH_ENGINE_CONDITION_PUSHDOWN
)
||
(
tab
->
table
->
file
->
ha_table_flags
()
&
HA_MUST_USE_TABLE_CONDITION_PUSHDOWN
))
&&
!
first_inner_tab
)
{
{
COND
*
push_cond
=
COND
*
push_cond
=
make_cond_for_table
(
thd
,
tmp
,
current_map
,
current_map
,
make_cond_for_table
(
thd
,
tmp
,
current_map
,
current_map
,
...
@@ -23559,11 +23555,7 @@ int JOIN::save_explain_data_intern(Explain_query *output, bool need_tmp_table,
...
@@ -23559,11 +23555,7 @@ int JOIN::save_explain_data_intern(Explain_query *output, bool need_tmp_table,
{
{
const
COND
*
pushed_cond
=
tab
->
table
->
file
->
pushed_cond
;
const
COND
*
pushed_cond
=
tab
->
table
->
file
->
pushed_cond
;
if
(((
thd
->
variables
.
optimizer_switch
&
if
(
thd
->
use_cond_push
(
tab
->
table
->
file
)
&&
pushed_cond
)
OPTIMIZER_SWITCH_ENGINE_CONDITION_PUSHDOWN
)
||
(
tab
->
table
->
file
->
ha_table_flags
()
&
HA_MUST_USE_TABLE_CONDITION_PUSHDOWN
))
&&
pushed_cond
)
{
{
eta
->
push_extra
(
ET_USING_WHERE_WITH_PUSHED_CONDITION
);
eta
->
push_extra
(
ET_USING_WHERE_WITH_PUSHED_CONDITION
);
/*
/*
...
...
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