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

LP:732124 - union + limit returns wrong result

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • None
    • None
    • None

    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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.