• gkodinov/kgeorge@magare.gmz's avatar
    Bug #27786: · 4c89a596
    gkodinov/kgeorge@magare.gmz authored
    When merging views into the enclosing statement
    the ORDER BY clause of the view is merged to the
    parent's ORDER BY clause.
    However when the VIEW is merged into an UNION
    branch the ORDER BY should be ignored. 
    Use of ORDER BY for individual SELECT statements
    implies nothing about the order in which the rows
    appear in the final result because UNION by default
    produces unordered set of rows.
    Fixed by ignoring the ORDER BY clause from the merge
    view when expanded in an UNION branch.
    4c89a596
view.test 80.9 KB