Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-3428

LP:732124 - union + limit returns wrong result

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      create table t1 (a int);
      insert into t1 values (10),(10),(10),(2),(3),(4),(5),(6),(7),(8),(9),(1),(10);
      select a from t1 where false UNION select a from t1 limit 8;

      ->
      ------

      a

      ------

      10
      2
      3
      4
      5
      6

      ------
      6 rows in set

      Which is wrong as there should be 8 rows in the result

      This only happens with union distinct without order by.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            monty Michael Widenius added a comment -

            Re: union + limit returns wrong result
            Fix pushed into 5.1 trunk

            Show
            monty Michael Widenius added a comment - Re: union + limit returns wrong result Fix pushed into 5.1 trunk
            Hide
            ratzpo Rasmus Johansson added a comment -

            Launchpad bug id: 732124

            Show
            ratzpo Rasmus Johansson added a comment - Launchpad bug id: 732124

              People

              • Assignee:
                monty Michael Widenius
                Reporter:
                monty Michael Widenius
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: