• unknown's avatar
    Fixed bug #26661: crash when order by clause in a union · d738e0ea
    unknown authored
    construct references invalid name.
    Derived tables currently cannot use outer references.
    Thus there is no outer context for them.
    The 4.1 code takes this fact into account while the 
    Item_field::fix_outer_field code of 5.0 lost the check that blocks
    any attempts to resolve names in outer context for derived tables.
    
    
    mysql-test/r/union.result:
      Added a test case for bug #26661.
    mysql-test/t/union.test:
      Added a test case for bug #26661.
    sql/item.cc:
      Fixed bug #26661.
      Derived tables currently cannot use outer references.
      Thus there is no outer context for them.
      The 4.1 code takes this fact into account while the 
      Item_field::fix_outer_field code of 5.0 lost the check that blocks
      any attempts to resolve names in outer context for derived tables.
    d738e0ea
union.test 31.4 KB