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

order operator not working with 'UNION' expression

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 10.0.17
    • N/A
    • Parser
    • None
    • Linux

    Description

      CREATE DATABASE `test9`CHARACTER SET utf8 COLLATE utf8_general_ci; 
      USE `test9`; 
      CREATE TABLE `test`( `ordering` INT UNSIGNED ); 
      INSERT INTO test(ordering) VALUES (5),(2),(4),(3),(9),(8); 

      SELECT 0
      UNION ALL
      (SELECT ordering FROM test ORDER BY ordering)

      Expecting:

      ordering  
      ----------
               0
               2
               3
               4
               5
               8
               9

      But server return:

           0  
      --------
             0
             5
             2
             4
             3
             9
             8

      Attachments

        Activity

          People

            Unassigned Unassigned
            mikhail Mikhail Gavrilov
            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.