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

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.2, 10.3
    • 10.2.40, 10.3.31
    • Parser
    • 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

            igor Igor Babaev
            igor Igor Babaev
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.