1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Fixed the bug mdev-12373.

Condition pushdown into derived tables / views with side effects
is not allowed.
This commit is contained in:
Igor Babaev
2017-04-24 23:58:23 -07:00
parent 0906dc49e8
commit 4beb7e5355
5 changed files with 204 additions and 0 deletions

View File

@ -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);