Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CBRD-25696] Remove unused variables in lock_manager.c #5670

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions src/transaction/lock_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -3240,7 +3240,6 @@ lock_internal_perform_lock_object (THREAD_ENTRY * thread_p, int tran_index, cons
{
LF_TRAN_ENTRY *t_entry_ent = thread_get_tran_entry (thread_p, THREAD_TS_OBJ_LOCK_ENT);
LK_RES_KEY search_key;
TRAN_ISOLATION isolation;
int ret_val;
LOCK group_mode, old_mode, new_mode; /* lock mode */
LK_RES *res_ptr;
Expand Down Expand Up @@ -3309,9 +3308,6 @@ lock_internal_perform_lock_object (THREAD_ENTRY * thread_p, int tran_index, cons
}
#endif /* LK_DUMP */

/* isolation */
isolation = logtb_find_isolation (tran_index);

/* initialize */
*entry_addr_ptr = NULL;

Expand Down Expand Up @@ -5946,7 +5942,6 @@ lock_object (THREAD_ENTRY * thread_p, const OID * oid, const OID * class_oid, LO
#else /* !SERVER_MODE */
int tran_index;
int wait_msecs;
TRAN_ISOLATION isolation;
LOCK new_class_lock;
LOCK old_class_lock;
int granted;
Expand Down Expand Up @@ -6028,7 +6023,6 @@ lock_object (THREAD_ENTRY * thread_p, const OID * oid, const OID * class_oid, LO
{
wait_msecs = logtb_find_wait_msecs (tran_index);
}
isolation = logtb_find_isolation (tran_index);

/* check if the given oid is root class oid */
if (OID_IS_ROOTOID (oid))
Expand Down Expand Up @@ -6160,7 +6154,6 @@ lock_subclass (THREAD_ENTRY * thread_p, const OID * subclass_oid, const OID * su
int granted;
int tran_index;
int wait_msecs;
TRAN_ISOLATION isolation;
#if defined (EnableThreadMonitoring)
TSC_TICKS start_tick, end_tick;
TSCTIMEVAL elapsed_time;
Expand Down Expand Up @@ -6199,7 +6192,6 @@ lock_subclass (THREAD_ENTRY * thread_p, const OID * subclass_oid, const OID * su
{
wait_msecs = logtb_find_wait_msecs (tran_index);
}
isolation = logtb_find_isolation (tran_index);

/* get the intentional lock mode to be acquired on class oid */
if (lock <= S_LOCK)
Expand Down Expand Up @@ -6307,7 +6299,6 @@ lock_scan (THREAD_ENTRY * thread_p, const OID * class_oid, int cond_flag, LOCK c
#else /* !SERVER_MODE */
int tran_index;
int wait_msecs;
TRAN_ISOLATION isolation;
int granted;
LK_ENTRY *root_class_entry = NULL;
LK_ENTRY *class_entry = NULL;
Expand Down Expand Up @@ -6339,7 +6330,6 @@ lock_scan (THREAD_ENTRY * thread_p, const OID * class_oid, int cond_flag, LOCK c
assert (cond_flag == LK_UNCOND_LOCK);
wait_msecs = logtb_find_wait_msecs (tran_index);
}
isolation = logtb_find_isolation (tran_index);

/* acquire the lock on the class */
/* NOTE that in case of acquiring a lock on a class object, the higher lock granule of the class object is not given. */
Expand Down Expand Up @@ -6396,7 +6386,6 @@ lock_classes_lock_hint (THREAD_ENTRY * thread_p, LC_LOCKHINT * lockhint)
#else /* !SERVER_MODE */
int tran_index;
int wait_msecs;
TRAN_ISOLATION isolation;
LK_LOCKINFO cls_lockinfo_space[LK_LOCKINFO_FIXED_COUNT];
LK_LOCKINFO *cls_lockinfo;
LK_ENTRY *root_class_entry = NULL;
Expand Down Expand Up @@ -6433,7 +6422,6 @@ lock_classes_lock_hint (THREAD_ENTRY * thread_p, LC_LOCKHINT * lockhint)

tran_index = LOG_FIND_THREAD_TRAN_INDEX (thread_p);
wait_msecs = logtb_find_wait_msecs (tran_index);
isolation = logtb_find_isolation (tran_index);

/* We do not want to rollback the transaction in the event of a deadlock. For now, let's just wait a long time. If
* deadlock, the transaction is going to be notified of lock timeout instead of aborted. */
Expand Down
Loading