diff --git a/lib/MySQL_Session.cpp b/lib/MySQL_Session.cpp index 1ed64180e..ca3de7e80 100644 --- a/lib/MySQL_Session.cpp +++ b/lib/MySQL_Session.cpp @@ -2333,6 +2333,10 @@ handler_again: if (myds->myconn->IsActiveTransaction()==true) { // only active transaction is important here. Ignore other criterias transaction_persistent_hostgroup=current_hostgroup; } + } else { + if (myds->myconn->IsActiveTransaction()==false) { // a transaction just completed + transaction_persistent_hostgroup=-1; + } } } }