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

Online alter does not support ORDER BY

Details

    Description

      create table t (f int);
      alter online table t order by f;
       
      # Cleanup
      drop table t;
      

      bb-10.10-MDEV-16329 cb1f08bd

      mysqltest: At line 2: query 'alter online table t order by f' failed: ER_ALTER_OPERATION_NOT_SUPPORTED_REASON (1846): LOCK=NONE is not supported. Reason: COPY algorithm requires a lock. Try LOCK=SHARED
      

      If it's expected, it needs to be documented, I didn't find it so far.

      Attachments

        Issue Links

          Activity

            This is, of course, intentional. Online ALTER works by remembering all changes done to the original table while it's being converted and applying them later in a catch-up step. The total row ordering cannot be guaranteed in this case.

            serg Sergei Golubchik added a comment - This is, of course, intentional. Online ALTER works by remembering all changes done to the original table while it's being converted and applying them later in a catch-up step. The total row ordering cannot be guaranteed in this case.

            People

              serg Sergei Golubchik
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.