From d523a012055a8f2c28ec1bb039f9a34fa4f6d0ec Mon Sep 17 00:00:00 2001
From: theshy <228933550@qq.com>
Date: Thu, 8 Aug 2024 15:14:36 -0400
Subject: [PATCH] fixbug

---
 src/execution/executor_index_scan.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/execution/executor_index_scan.h b/src/execution/executor_index_scan.h
index 4d9ebba0..ff4613b9 100644
--- a/src/execution/executor_index_scan.h
+++ b/src/execution/executor_index_scan.h
@@ -348,7 +348,10 @@ class IndexScanExecutor : public AbstractExecutor {
             scan_->next();
             if(!scan_->is_end()) {
                 rid_ = scan_->rid();
+                if(!ifmodify_)
                 context_->lock_mgr_->lock_shared_on_record(context_->txn_, rid_, fh_->GetFd());
+                else
+                context_->lock_mgr_->lock_exclusive_on_record(context_->txn_, rid_, fh_->GetFd());
             }  
         }
     }
-- 
GitLab