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

Implement descending index: KEY (a DESC, b ASC)

Details

    Description

      MySQL 8.0 introduced support for descending indexes in WL#1074. This involved some changes in InnoDB and many in the optimizer.

      MariaDB and older versions of MySQL silently ignore the ASC/DESC attribute in KEY definitions. All index fields (KEY_PART) are sorted in ascending order.

      The Oracle database defines the NULLS FIRST and NULLS LAST attributes for the ORDER BY clause, but not for CREATE INDEX. The defaults are the exact opposite of InnoDB behaviour:

      NULLS LAST is the default for ascending order, and NULLS FIRST is the default for descending order.

      InnoDB in MariaDB and before MySQL 8.0 supports only ascending order, and it sorts NULLS FIRST, not NULLS LAST like the above quote suggests Oracle to do.

      Attachments

        Issue Links

          Activity

            Transition Time In Source Status Execution Times
            Sergei Petrunia made transition -
            Open In Progress
            1549d 5h 33m 1
            Elena Stepanova made transition -
            In Progress In Testing
            13d 22h 23m 1
            Elena Stepanova made transition -
            In Testing Stalled
            38d 22h 17m 1
            Sergei Golubchik made transition -
            Stalled Closed
            3h 30m 1

            People

              serg Sergei Golubchik
              marko Marko Mäkelä
              Votes:
              24 Vote for this issue
              Watchers:
              24 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.