Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-3841 LevelDB storage engine
  3. MDEV-4039

LevelDB: SELECT .. FOR UPDATE locks a row outside of transaction and prevents UPDATE from the same connection

    XMLWordPrintable

Details

    • Technical task
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • None
    • None
    • None

    Description

      SELECT .. FOR UPDATE is supposed to lock a row for the current connection, not from it as it happens now.
      Besides, outside a transaction it should have no effect at all, but now it does.
      The test case below shows both problems – UPDATE fails with ER_LOCK_WAIT_TIMEOUT.

      create table t1 (pk int primary key, i int) engine=LevelDB;
      set autocommit=1;
      insert into t1 values (1,1);
      select * from t1 where pk = 1 for update;
      update t1 set i = 10 where pk = 1;

      mysqltest: At line 8: query 'update t1 set i = 10 where pk = 1' failed: 1205: Lock wait timeout exceeded; try restarting transaction

      revision-id: psergey@askmonty.org-20130114131529-qv3531bw9fdklwob
      revno: 4483
      branch-nick: mysql-5.6-leveldb

      Attachments

        Activity

          People

            psergei Sergei Petrunia
            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.