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

Online alter fails under LOCK TABLE with ER_ALTER_OPERATION_NOT_SUPPORTED_REASON

Details

    Description

      create table t (f int);
      lock table t write;
      alter table t force, algorithm=copy, lock=none;
       
      # Cleanup
      drop table t;
      

      bb-10.10-MDEV-16329 cb1f08bd1c

      mysqltest: At line 3: query 'alter table t force, algorithm=copy, lock=none' 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.

      Attachments

        Issue Links

          Activity

            elenst Elena Stepanova created issue -
            elenst Elena Stepanova made changes -
            Field Original Value New Value
            serg Sergei Golubchik made changes -
            Priority Critical [ 2 ] Major [ 3 ]
            serg Sergei Golubchik added a comment - - edited

            Generally, independently from algorithm, it does not make sense to specify lock=shared or lock=none under lock tables, because the table is already exclusively locked.

            the question is, should be an error "cannot use lock=xxx under lock tables"? a warning "lock=xxx has no effect under lock tables"? or keep the current behavior and silently ignore the lock=xxx clause?

            serg Sergei Golubchik added a comment - - edited Generally, independently from algorithm, it does not make sense to specify lock=shared or lock=none under lock tables , because the table is already exclusively locked. the question is, should be an error "cannot use lock=xxx under lock tables"? a warning "lock=xxx has no effect under lock tables"? or keep the current behavior and silently ignore the lock=xxx clause?
            elenst Elena Stepanova added a comment - - edited

            I don't think we can make it an error easily, at least for lock=shared it already succeeds in the existing versions, so it would be a regression, and not a very well justified one.
            A warning does make sense, I suppose.

            elenst Elena Stepanova added a comment - - edited I don't think we can make it an error easily, at least for lock=shared it already succeeds in the existing versions, so it would be a regression, and not a very well justified one. A warning does make sense, I suppose.
            serg Sergei Golubchik made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            serg Sergei Golubchik made changes -
            Status In Progress [ 3 ] Stalled [ 10000 ]
            serg Sergei Golubchik made changes -
            Assignee Sergei Golubchik [ serg ] Nikita Malyavin [ nikitamalyavin ]
            Status Stalled [ 10000 ] In Review [ 10002 ]
            nikitamalyavin Nikita Malyavin made changes -
            Assignee Nikita Malyavin [ nikitamalyavin ] Sergei Golubchik [ serg ]
            Status In Review [ 10002 ] Stalled [ 10000 ]

            ok

            nikitamalyavin Nikita Malyavin added a comment - ok
            angelique.sklavounos Angelique Sklavounos (Inactive) made changes -
            serg Sergei Golubchik made changes -
            Status Stalled [ 10000 ] In Testing [ 10301 ]
            nikitamalyavin Nikita Malyavin made changes -
            nikitamalyavin Nikita Malyavin made changes -
            serg Sergei Golubchik made changes -
            serg Sergei Golubchik made changes -
            ralf.gebhardt Ralf Gebhardt made changes -
            Fix Version/s 10.11 [ 27614 ]
            Fix Version/s 10.10 [ 27530 ]
            ralf.gebhardt Ralf Gebhardt made changes -
            Priority Major [ 3 ] Critical [ 2 ]
            serg Sergei Golubchik made changes -
            Fix Version/s 10.12 [ 28320 ]
            Fix Version/s 10.11 [ 27614 ]
            ralf.gebhardt Ralf Gebhardt made changes -
            Fix Version/s 11.1 [ 28549 ]
            Fix Version/s 11.0 [ 28320 ]
            serg Sergei Golubchik made changes -
            Fix Version/s N/A [ 14700 ]
            Fix Version/s 11.1 [ 28549 ]
            Resolution Fixed [ 1 ]
            Status In Testing [ 10301 ] Closed [ 6 ]
            elenst Elena Stepanova made changes -
            serg Sergei Golubchik made changes -
            Fix Version/s 11.2.1 [ 29034 ]
            Fix Version/s N/A [ 14700 ]

            People

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