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

Skip locked errors with "Operation not permitted" during COMMIT

    XMLWordPrintable

Details

    Description

      It looks like the skip locked clause is affected by a SET @@SESSION.innodb_lock_wait_timeout = 0.

      Assume the following table and data:

      create table details(id int not null primary key, name varchar(255));
      insert into details values (1, 'a');
      

      Now comes along transaction 1:

      begin;
      select name from details where id=1 for update;
      

      Notice, no commit yet.

      And then comes transaction 2:

      SET @@SESSION.innodb_lock_wait_timeout = 0;
      begin;
      select name from details where id=1 for update skip locked;
      

      Transaction 2 will fail saying Got error 1 "Operation not permitted" during COMMIT.

      Attachments

        Issue Links

          Activity

            People

              danblack Daniel Black
              cbeikov Christian Beikov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.