Merge pull request #2647 from sysown/v2.0.11-multi-stmt

fix multi statement
pull/2671/head
René Cannaò 6 years ago committed by GitHub
commit 6714700afe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1873,7 +1873,7 @@ bool MySQL_Session::handler_again___verify_backend_net_write_timeout() {
}
bool MySQL_Session::handler_again___verify_backend_multi_statement() {
if (client_myds->myconn->options.client_flag & CLIENT_MULTI_STATEMENTS != mybe->server_myds->myconn->options.client_flag & CLIENT_MULTI_STATEMENTS) {
if ((client_myds->myconn->options.client_flag & CLIENT_MULTI_STATEMENTS) != (mybe->server_myds->myconn->options.client_flag & CLIENT_MULTI_STATEMENTS)) {
if (client_myds->myconn->options.client_flag & CLIENT_MULTI_STATEMENTS)
mybe->server_myds->myconn->options.client_flag |= CLIENT_MULTI_STATEMENTS;
@ -2607,7 +2607,11 @@ bool MySQL_Session::handler_again___status_SETTING_MULTI_STMT(int *_rc) {
previous_status.pop();
NEXT_IMMEDIATE_NEW(st);
} else {
proxy_error("Error setting multistatemnt on server\n");
if (rc==-1) {
proxy_error("Error setting multistatement on server %s , %d : %d, %s\n", myconn->parent->address, myconn->parent->port, mysql_errno(myconn->mysql), mysql_error(myconn->mysql));
} else {
// rc==1 , nothing to do for now
}
}
return ret;
}

Loading…
Cancel
Save