Skip to content

Commit 194e20b

Browse files
committed
Revert "Reset current_hostgroup to default when no query rule matches"
This reverts commit 1b3d203.
1 parent 1f0756b commit 194e20b

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

lib/PgSQL_Session.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4470,13 +4470,8 @@ bool PgSQL_Session::handler___status_WAITING_CLIENT_DATA___STATE_SLEEP___PGSQL_Q
44704470
next_query_flagIN = qpo->next_query_flagIN;
44714471
}
44724472

4473-
if (transaction_persistent_hostgroup == -1) {
4474-
if (qpo->destination_hostgroup >= 0) {
4475-
current_hostgroup = qpo->destination_hostgroup;
4476-
} else {
4477-
// No query rule matched - use default hostgroup
4478-
current_hostgroup = default_hostgroup;
4479-
}
4473+
if (qpo->destination_hostgroup >= 0 && transaction_persistent_hostgroup == -1) {
4474+
current_hostgroup = qpo->destination_hostgroup;
44804475
}
44814476

44824477
// Hostgroup locking check

0 commit comments

Comments
 (0)