• unknown's avatar
    Fixed bug #26661: crash when order by clause in a union · 729bcaf4
    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.
    729bcaf4
union.result 40.2 KB