Uploaded image for project: 'MariaDB ColumnStore'
  1. MariaDB ColumnStore
  2. MCOL-1829

Output of 'select * (with order by limit) queries' returns unexpected result

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.1.5, 1.2.1
    • Fix Version/s: 1.1.7, 1.2.3
    • Component/s: None
    • Labels:
      None
    • Sprint:
      2018-21, 2019-01

      Description

      1. simple table created. 4 rows of data is entered.

      CREATE TABLE `football_teams` (
      `num` int(11) DEFAULT NULL,
      `name` varchar(32) DEFAULT NULL,
      `roster_size` int(11) DEFAULT NULL
      ) ENGINE=Columnstore;

      insert into football_teams VALUES (1,'Green Bay',53);
      insert into football_teams VALUES (2,'Chicago',53);
      insert into football_teams VALUES (3,'Detroit',53);
      insert into football_teams VALUES (4,'Minnesota',53);

      MariaDB [test]> select * from football_teams;
      --------------------------

      num name roster_size

      --------------------------

      1 Green Bay 53
      2 Chicago 53
      3 Detroit 53
      4 Minnesota 53

      --------------------------

      2. A query that orders the entries by a column and limits the return. This output is as expected.

      MariaDB [test]> select distinct num from football_teams order by num limit 3;
      ------

      num

      ------

      1
      2
      3

      ------

      3. subquery result set is not equivalent with result in step-2

      MariaDB [test]> select * from (select distinct num from football_teams order by num limit 3) a;
      ------

      num

      ------

      3

      ------

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dleeyh Daniel Lee
              Reporter:
              muhammad.irfan Muhammad Irfan
              Votes:
              1 Vote for this issue
              Watchers:
              10 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Git Integration