diff options
author | Igor Babaev <igor@askmonty.org> | 2018-10-12 11:44:19 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2018-10-12 11:45:04 -0700 |
commit | 6d29c8527b4215cb516f709013cc6dfc6475da7d (patch) | |
tree | 8eb43d97867c758b222cc865633106edbe686095 /sql/item.cc | |
parent | 81a5b6ccd531e802bbb0f2034189095d2196de8b (diff) | |
download | mariadb-git-6d29c8527b4215cb516f709013cc6dfc6475da7d.tar.gz |
MDEV-17354 Server crashes in add_key_field / .. / Item_func_null_predicate::add_key_fields
upon INSERT .. SELECT
The function Item *Item_direct_view_ref::derived_field_transformer_for_where()
erroneously did not strip off ref wrappers from references to materialized
derived tables / views. As a result the expressions that contained some
references of the type Item_direct_view_ref to columns of a materialized
derived table / view V were pushed into V incorrectly. This could cause
crashes for some INSERT ... SELECT statements.
Diffstat (limited to 'sql/item.cc')
-rw-r--r-- | sql/item.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/item.cc b/sql/item.cc index 35de01b1186..2adec33491b 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -7214,7 +7214,7 @@ Item *Item_direct_view_ref::derived_field_transformer_for_where(THD *thd, DBUG_ASSERT (producing_item != NULL); return producing_item->build_clone(thd, thd->mem_root); } - return this; + return (*ref); } static |