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

    Details

    • Type: Technical task
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      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
      

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            psergey Sergei Petrunia added a comment -

            Duplicate of MDEV-4047

            Show
            psergey Sergei Petrunia added a comment - Duplicate of MDEV-4047

              People

              • Assignee:
                psergey Sergei Petrunia
                Reporter:
                elenst Elena Stepanova
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: