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 committed Aug 12, 2021
1 parent 76be6e2 commit 2145507
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 @@ -4436,6 +4436,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 2145507

Please sign in to comment.