diff options
author | Igor Babaev <igor@askmonty.org> | 2017-04-24 23:58:23 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2017-04-24 23:58:23 -0700 |
commit | 4beb7e5355f7bfbec8bfdb0f00b933fbf76dfa61 (patch) | |
tree | 9e09be59fc157c86129bce9ec893ab70fa080619 /sql/sql_derived.cc | |
parent | 0906dc49e8c442ca00b8b7889ee09812040e5638 (diff) | |
download | mariadb-git-4beb7e5355f7bfbec8bfdb0f00b933fbf76dfa61.tar.gz |
Fixed the bug mdev-12373.
Condition pushdown into derived tables / views with side effects
is not allowed.
Diffstat (limited to 'sql/sql_derived.cc')
-rw-r--r-- | sql/sql_derived.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc index 90b6dad313a..916f7057607 100644 --- a/sql/sql_derived.cc +++ b/sql/sql_derived.cc @@ -1147,6 +1147,9 @@ bool pushdown_cond_for_derived(THD *thd, Item *cond, TABLE_LIST *derived) st_select_lex_unit *unit= derived->get_unit(); st_select_lex *sl= unit->first_select(); + if (derived->prohibit_cond_pushdown) + DBUG_RETURN(false); + /* Do not push conditions into constant derived */ if (unit->executed) DBUG_RETURN(false); |