Skip to content

Commit

Permalink
If a session is locked on hostgroup , autocommit is copied from backe…
Browse files Browse the repository at this point in the history
…nd connection

Closes #3459
  • Loading branch information
renecannao authored and JavierJF committed Aug 31, 2021
1 parent b897ee3 commit 0525c02
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/MySQL_Session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4503,6 +4503,14 @@ int MySQL_Session::handler() {

handler_rc0_Process_GTID(myconn);

// if we are locked on hostgroup, the value of autocommit is copied from the backend connection
// see bug #3549
if (locked_on_hostgroup >= 0) {
assert(myconn != NULL);
assert(myconn->mysql != NULL);
autocommit = myconn->mysql->server_status & SERVER_STATUS_AUTOCOMMIT;
}

if (mirror == false) {
// Support for LAST_INSERT_ID()
if (myconn->mysql->insert_id) {
Expand Down

0 comments on commit 0525c02

Please sign in to comment.