• Igor Babaev's avatar
    MDEV-16420 View stop working after upgrade from 10.1.15 to 10.3.7 · 956b2962
    Igor Babaev authored
    This bug happened for queries that used a materialized view that
    renamed columns of the specifying query in an inner table of
    an outer join. For such a query name resolution for a column
    belonging the view could fail if the underlying column was
    non-nullable.
    When creating the defintion of the the temporary table for
    the materialized view used in the inner part of an outer join
    the definition of the non-nullable columns are created by the
    function create_tmp_field_from_item() that names the columns
    according to the names of the underlying columns. So these names
    should be changed for the view column names.
    
    This bug cannot be reproduced in 10.2 because there setup_fields()
    called when preparing joins in the view specification effectively
    renames the underlying columns in the function find_field_in_view().
    In 10.3 this renaming was removed as improper
    (see Monty's commit b478276b).
    956b2962
derived_view.result 105 KB