From 4c2abb7cebf91001d2d6465cec8cfc2bdbb79306 Mon Sep 17 00:00:00 2001 From: yahong Date: Mon, 23 Dec 2024 14:27:36 +0900 Subject: [PATCH] [CBRD-25754] Print that DEADLOCK occurred even if malloc fails. --- src/transaction/lock_manager.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/transaction/lock_manager.c b/src/transaction/lock_manager.c index ca6659025f..4de65b93e0 100644 --- a/src/transaction/lock_manager.c +++ b/src/transaction/lock_manager.c @@ -8027,14 +8027,14 @@ lock_detect_local_deadlock (THREAD_ENTRY * thread_p) /* dump deadlock cycle to event log file */ for (k = 0; k < victim_count; k++) { - if (victims[k].log_num_entries == 0 || victims[k].log_entries == NULL) - { - continue; - } - log_fp = event_log_start (thread_p, "DEADLOCK"); if (log_fp != NULL) { + if (victims[k].log_entries == NULL) + { + event_log_end (thread_p); + continue; + } lock_event_log_deadlock_locks (thread_p, log_fp, victims[k].tran_index, victims[k].log_trunc, victims[k].log_num_entries, victims[k].log_entries); event_log_end (thread_p);