diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-12-16 07:47:17 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-12-16 07:47:17 +0200 |
commit | 28c89b7151bc3ebd7a3459e85f4c9b5e73529629 (patch) | |
tree | ce50324e5d1054f59a7178bfdb426189998baf52 /sql/sql_derived.cc | |
parent | 745fd4b39f8aff6300682502ed2ddf61ee343866 (diff) | |
parent | 8fa759a5762733d9f8a4050437fadcd255ecd1a2 (diff) | |
download | mariadb-git-28c89b7151bc3ebd7a3459e85f4c9b5e73529629.tar.gz |
Merge 10.4 into 10.5
Diffstat (limited to 'sql/sql_derived.cc')
-rw-r--r-- | sql/sql_derived.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc index fc6bf44bbb1..c713f1322dc 100644 --- a/sql/sql_derived.cc +++ b/sql/sql_derived.cc @@ -741,8 +741,15 @@ bool mysql_derived_prepare(THD *thd, LEX *lex, TABLE_LIST *derived) case SQLCOM_DELETE_MULTI: case SQLCOM_UPDATE: case SQLCOM_UPDATE_MULTI: - if ((res= unit->prepare(derived, derived->derived_result, 0))) + if ((res= first_select->vers_setup_conds(thd, + derived->merge_underlying_list))) goto exit; + if (derived->merge_underlying_list->where) + { + Query_arena_stmt on_stmt_arena(thd); + derived->where= and_items(thd, derived->where, + derived->merge_underlying_list->where); + } default: break; } |