• timour@mysql.com's avatar
    Fix for BUG#13127. · e609eac0
    timour@mysql.com authored
    The problem was in the way table references are pre-filtered when
    resolving a qualified field. When resolving qualified table references
    we search recursively in the operands of the join. If there is
    natural/using join with a merge view, the first call to find_field_in_table_ref
    makes a recursive call to itself with the view as the new table reference
    to search for the column. However the view has both nested_join and
    join_columns != NULL so it skipped the test whether the view name matches
    the field qualifier. As a result the field was found in the view since the
    view already has a field with the same name. Thus the field was incorrectly
    resolved as the view field.
    e609eac0
select.test 136 KB