From dd3529107085280ee8df5dd209eb5e269c8d02cc Mon Sep 17 00:00:00 2001 From: jan Date: Tue, 28 Mar 2006 06:34:12 +0000 Subject: [PATCH] Port r375 from branches/5.0: Fix bug #15650 additional error InnoDB: Error: unlock row could not find a 0 mode lock on the record. --- handler/ha_innodb.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/handler/ha_innodb.cc b/handler/ha_innodb.cc index 616c6c509ad..66c3cebcff8 100644 --- a/handler/ha_innodb.cc +++ b/handler/ha_innodb.cc @@ -3873,6 +3873,13 @@ ha_innobase::unlock_row(void) ut_error; } + /* Consistent read does not take any locks, thus there is + nothing to unlock. */ + + if (prebuilt->select_lock_type == LOCK_NONE) { + DBUG_VOID_RETURN; + } + switch (prebuilt->row_read_type) { case ROW_READ_WITH_LOCKS: if (!srv_locks_unsafe_for_binlog