Skip to content

Commit

Permalink
Clean up query metadata when set autocommit fails #1257
Browse files Browse the repository at this point in the history
  • Loading branch information
renecannao committed Nov 23, 2017
1 parent 3745b28 commit b8e490b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/MySQL_Session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1779,6 +1779,7 @@ bool MySQL_Session::handler_again___status_CHANGING_CHARSET(int *_rc) {
myds->fd=0;
status=WAITING_CLIENT_DATA;
client_myds->DSS=STATE_SLEEP;
RequestEnd(myds);
}
} else {
// rc==1 , nothing to do for now
Expand Down Expand Up @@ -1832,6 +1833,7 @@ bool MySQL_Session::handler_again___status_CHANGING_AUTOCOMMIT(int *_rc) {
client_myds->myprot.generate_pkt_ERR(true,NULL,NULL,1,mysql_errno(myconn->mysql),sqlstate,mysql_error(myconn->mysql));
myds->destroy_MySQL_Connection_From_Pool(true);
myds->fd=0;
RequestEnd(myds);
status=WAITING_CLIENT_DATA;
client_myds->DSS=STATE_SLEEP;
}
Expand Down

0 comments on commit b8e490b

Please sign in to comment.