From 194e20b3e89ab99d82aa871992b099fe168e5448 Mon Sep 17 00:00:00 2001 From: Rahim Kanji Date: Fri, 20 Feb 2026 01:29:53 +0500 Subject: [PATCH] Revert "Reset current_hostgroup to default when no query rule matches" This reverts commit 1b3d20388ef829df7df9b2f3ea70becbdd9e6291. --- lib/PgSQL_Session.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/PgSQL_Session.cpp b/lib/PgSQL_Session.cpp index b4846038c..086148c38 100644 --- a/lib/PgSQL_Session.cpp +++ b/lib/PgSQL_Session.cpp @@ -4470,13 +4470,8 @@ __exit_set_destination_hostgroup: next_query_flagIN = qpo->next_query_flagIN; } - if (transaction_persistent_hostgroup == -1) { - if (qpo->destination_hostgroup >= 0) { - current_hostgroup = qpo->destination_hostgroup; - } else { - // No query rule matched - use default hostgroup - current_hostgroup = default_hostgroup; - } + if (qpo->destination_hostgroup >= 0 && transaction_persistent_hostgroup == -1) { + current_hostgroup = qpo->destination_hostgroup; } // Hostgroup locking check