List:Commits« Previous MessageNext Message »
From:marko.makela Date:June 2 2010 11:54am
Subject:bzr push into mysql-trunk-innodb branch (marko.makela:3137 to 3138)
View as plain text  
 3138 Marko Mäkelä	2010-06-02
      ut_strerr(): Handle DB_SUCCESS_LOCKED_REC.

    modified:
      storage/innobase/ut/ut0ut.c
 3137 Marko Mäkelä	2010-06-02
      Merge from mysql-5.1-innodb:
      
      ------------------------------------------------------------
      revno: 3495
      committer: Marko Mäkelä <marko.makela@oracle.com>
      branch nick: 5.1-innodb
      timestamp: Wed 2010-06-02 13:37:14 +0300
      message:
        Bug#53674: InnoDB: Error: unlock row could not find a 4 mode lock on the record
      
        In semi-consistent read, only unlock freshly locked non-matching records.
      
        lock_rec_lock_fast(): Return LOCK_REC_SUCCESS,
        LOCK_REC_SUCCESS_CREATED, or LOCK_REC_FAIL instead of TRUE/FALSE.
      
        enum db_err: Add DB_SUCCESS_LOCKED_REC for indicating a successful
        operation where a record lock was created.
      
        lock_sec_rec_read_check_and_lock(),
        lock_clust_rec_read_check_and_lock(), lock_rec_enqueue_waiting(),
        lock_rec_lock_slow(), lock_rec_lock(), row_ins_set_shared_rec_lock(),
        row_ins_set_exclusive_rec_lock(), sel_set_rec_lock(),
        row_sel_get_clust_rec_for_mysql(): Return DB_SUCCESS_LOCKED_REC if a
        new record lock was created. Adjust callers.
      
        row_unlock_for_mysql(): Correct the function documentation.
      
        row_prebuilt_t::new_rec_locks: Correct the documentation.

    added:
      mysql-test/suite/innodb/r/innodb_bug53674.result
      mysql-test/suite/innodb/t/innodb_bug53674-master.opt
      mysql-test/suite/innodb/t/innodb_bug53674.test
    modified:
      storage/innobase/include/db0err.h
      storage/innobase/include/lock0lock.h
      storage/innobase/include/row0mysql.h
      storage/innobase/lock/lock0lock.c
      storage/innobase/row/row0ins.c
      storage/innobase/row/row0mysql.c
      storage/innobase/row/row0sel.c
=== modified file 'storage/innobase/ut/ut0ut.c'
--- a/storage/innobase/ut/ut0ut.c	revid:marko.makela@stripped
+++ b/storage/innobase/ut/ut0ut.c	revid:marko.makela@stripped0100602115211-y3udux1qmrulsxcc
@@ -637,6 +637,8 @@ ut_strerr(
 	switch (num) {
 	case DB_SUCCESS:
 		return("Success");
+	case DB_SUCCESS_LOCKED_REC:
+		return("Success, record lock created");
 	case DB_ERROR:
 		return("Generic error");
 	case DB_INTERRUPTED:

Attachment: [text/bzr-bundle] bzr/marko.makela@oracle.com-20100602115211-y3udux1qmrulsxcc.bundle
Thread
bzr push into mysql-trunk-innodb branch (marko.makela:3137 to 3138) marko.makela2 Jun