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

MySQL and MariaDB results on derived_table are not the same

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 10.0.14, 10.0.21
    • N/A
    • Optimizer
    • None
    • Linux

    Description

      CREATE DATABASE `derived_issue`;
       
      CREATE TABLE `derived_issue`.`test` (
        `num` int(11) NOT NULL
      );
       
      INSERT INTO `derived_issue`.`test` (num)
      VALUES (12345),(1),(1234),(12),(123),(123456);
       
      SELECT * 
      FROM (
      	SELECT num 
      	FROM `derived_issue`.`test`
      	ORDER BY num DESC
      ) derived_table;

      on MariaDB the derived_table result

      12345
      1
      1234
      12
      123
      123456

      on MySQL the results is what is expected

      123456
      12345
      1234
      123
      12
      1

      not matter what engine or version you use the MariaDB give wrong order

      Attachments

        Activity

          People

            Unassigned Unassigned
            zed Gabor Aron
            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.