• unknown's avatar
    Fix bug#13327 check_equality() wasn't checking view's fields · 1e13b2de
    unknown authored
    check_equality() finds equalities among field items. It checks input items
    to be Item_fields thus skipping view's fields, which are represented by
    Item_direct_view_ref. Because of this index wasn't applied in all cases
    it can be.
    
    To fix this problem check_equality() now takes real item of
    Item_direct_view_ref, except outer view refs (with depended_from set).
    
    
    sql/sql_select.cc:
      Fix bug #13327 VIEW performs index scan
       For proper views fields handling check_equality() now takes real item from Item_direct_view_ref, with exception of outer view refs.
    mysql-test/r/view.result:
      Test case for bug#13327 VIEW performs index scan
    mysql-test/t/view.test:
      Test case for bug#13327 VIEW performs index scan
    1e13b2de
view.result 69.1 KB