From b368b281ee0fa6364c480ea3cc9f43ec5f6294ca Mon Sep 17 00:00:00 2001 From: Rahim Kanji Date: Thu, 20 Feb 2025 12:48:24 +0500 Subject: [PATCH] Added pg_advisory_xact_lock* detection --- lib/PgSQL_Connection.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/PgSQL_Connection.cpp b/lib/PgSQL_Connection.cpp index d28fdcc50..2cd818309 100644 --- a/lib/PgSQL_Connection.cpp +++ b/lib/PgSQL_Connection.cpp @@ -1856,8 +1856,8 @@ void PgSQL_Connection::ProcessQueryAndSetStatusFlags(char* query_digest_text) { set_status(false, STATUS_MYSQL_CONNECTION_LOCK_TABLES); } } - if (get_status(STATUS_MYSQL_CONNECTION_GET_LOCK) == false) { // we search for get_lock if not already set - if (strcasestr(query_digest_text, "GET_LOCK(")) { + if (get_status(STATUS_MYSQL_CONNECTION_GET_LOCK) == false) { // we search for pg_advisory_xact_lock* if not already set + if (strcasestr(query_digest_text, "SELECT pg_advisory_xact_lock")) { set_status(true, STATUS_MYSQL_CONNECTION_GET_LOCK); } }