diff options
author | Igor Babaev <igor@askmonty.org> | 2018-08-17 19:29:01 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2018-08-17 19:29:01 -0700 |
commit | 862a97749d5a36218ba4d55c26eef30cd7b2e3cb (patch) | |
tree | d104a208b11f089e2ca1d7a0c25f1acf1ac01b1e /sql/sql_select.cc | |
parent | 4eac5df3fcebb1adf52e33d9d88dc05bc1e339ce (diff) | |
download | mariadb-git-862a97749d5a36218ba4d55c26eef30cd7b2e3cb.tar.gz |
MDEV-17011 “condition_pushdown_for_derived” optimization not used when
using INSERT INTO
This patch allows condition pushdown into a materialized derived / view when
this table is used in INSERT SELECT, multi-table UPDATE and multi-table DELETE.
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r-- | sql/sql_select.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 643ddfeba39..b94ca496b95 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -1375,8 +1375,7 @@ JOIN::optimize_inner() DBUG_RETURN(1); } - if (thd->lex->sql_command == SQLCOM_SELECT && - optimizer_flag(thd, OPTIMIZER_SWITCH_COND_PUSHDOWN_FOR_DERIVED)) + if (optimizer_flag(thd, OPTIMIZER_SWITCH_COND_PUSHDOWN_FOR_DERIVED)) { TABLE_LIST *tbl; List_iterator_fast<TABLE_LIST> li(select_lex->leaf_tables); |