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

Order from subquery lost

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 10.4.12, 10.6.4
    • N/A
    • N/A
    • None
    • CentOS7 x64

    Description

      Test case:

      CREATE TABLE `_article2category` (
      	`category_id` INT
      );
      	
      INSERT INTO `_article2category` (`category_id`) VALUES
      (2), (1);
       
       
      SELECT
      	Sub.category_id
      FROM 
      (
      	SELECT 
      		A2C.category_id
      	FROM 
      		_article2category A2C
      	ORDER BY 
      		A2C.category_id ASC
      ) Sub;
       
      DROP TABLE _article2category;
      

      Expected:
      category_id
      1
      2

      Received:
      category_id
      2
      1

      When add index by category_id works as expected

      Attachments

        Activity

          People

            Unassigned Unassigned
            M-A-X M-A-X
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.