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

Wrong result selecting from simple view with LIMIT and ORDER BY

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.2, 10.3
    • Fix Version/s: 10.2.40, 10.3.31
    • Component/s: Parser
    • Labels:
      None

      Description

      The following test case demonstrate the problem:

      create table t1 (a int);
      insert into t1 values (3), (7), (1);
      create view v1 as (select a from t1 limit 2) order by a desc;
      (select a from t1 limit 2) order by a desc;
      select * from v1;
      

      MariaDB [test]> (select a from t1 limit 2) order by a desc;
      +------+
      | a    |
      +------+
      |    7 |
      |    3 |
      +------+
      2 rows in set (0.00 sec)
      MariaDB [test]> select * from v1;
      Empty set (0.00 sec)
      

        Attachments

          Activity

            People

            Assignee:
            igor Igor Babaev
            Reporter:
            igor Igor Babaev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration