Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Not a Bug
    • Affects Version/s: 10.0.15
    • Fix Version/s: N/A
    • Component/s: Optimizer
    • Labels:
      None
    • Environment:
      ubuntu 14.04.1 LTS

      Description

      following statement represents a simplified query; I simulate a 3-row table with a union statement.
      order by in the inner subselect does not affect the order of the outer select
      in mysql it does.
      statement:
      SELECT * FROM (SELECT * FROM (SELECT 'a' UNION SELECT 'b' UNION SELECT 'c' )t order BY a desc)t
      result: a,b,c
      in Mysql: c,b,a (correct)

        Gliffy Diagrams

          Attachments

            Activity

            Show
            elenst Elena Stepanova added a comment - Please see https://mariadb.com/kb/en/mariadb/faq/general-faq/why-is-order-by-in-a-from-subquery-ignored/

              People

              • Assignee:
                Unassigned
                Reporter:
                arbyter Robert Hofer
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: