@ -1498,7 +1498,23 @@ int MySQL_Session::handler_again___status_RESETTING_CONNECTION() {
proxy_error("Change user timeout during COM_CHANGE_USER on %s , %d\n",myconn->parent->address,myconn->parent->port);
}else{// rc==-1
intmyerr=mysql_errno(myconn->mysql);
proxy_error("Detected an error during COM_CHANGE_USER on (%d,%s,%d) , FD (Conn:%d , MyDS:%d) : %d, %s\n",myconn->parent->myhgc->hid,myconn->parent->address,myconn->parent->port,myds->fd,myds->myconn->fd,myerr,mysql_error(myconn->mysql));
// if rc was '-1' but 'mysql_errno' is 0, it means that the connection
// wasn't stablished because the server was detected to be down, *prior*
// to the connection attempt, and the session should be destroyed.
if(myerr!=0){
proxy_error("Detected an error during COM_CHANGE_USER on (%d,%s,%d) , FD (Conn:%d , MyDS:%d) : %d, %s\n",myconn->parent->myhgc->hid,myconn->parent->address,myconn->parent->port,myds->fd,myds->myconn->fd,myerr,mysql_error(myconn->mysql));
}else{
proxy_error(
"Detected an error during COM_CHANGE_USER on (%d,%s,%d) , FD (Conn:%d , MyDS:%d) : %d, %s\n",
myconn->parent->myhgc->hid,
myconn->parent->address,
myconn->parent->port,
myds->fd,
myds->myconn->fd,
myerr,
"Detected offline server prior to statement execution"
// if rc was '-1' but 'mysql_errno' is 0, it means that the connection
// wasn't stablished because the server was detected to be down, *prior*
// to the connection attempt, and the session should be destroyed.
if(myerr>=2000||myerr==0){
boolretry_conn=false;
// client error, serious
proxy_error("Detected a broken connection while setting INIT CONNECT on %s:%d hg %d : %d, %s\n",myconn->parent->address,myconn->parent->port,current_hostgroup,myerr,mysql_error(myconn->mysql));
if(myerr!=0){
proxy_error("Detected a broken connection while setting INIT CONNECT on %s:%d hg %d : %d, %s\n",myconn->parent->address,myconn->parent->port,current_hostgroup,myerr,mysql_error(myconn->mysql));
}else{
proxy_error(
"Detected a broken connection while setting INIT CONNECT on %s:%d hg %d : %d, %s\n",
myconn->parent->address,
myconn->parent->port,
current_hostgroup,
myerr,
"Detected offline server prior to statement execution"
// if rc was '-1' but 'mysql_errno' is 0, it means that the connection
// wasn't stablished because the server was detected to be down, *prior*
// to the connection attempt, and the session should be destroyed.
if(myerr>=2000||myerr==0){
boolretry_conn=false;
// client error, serious
proxy_error("Detected a broken connection while setting LDAP USER VARIABLE on %s:%d hg %d : %d, %s\n",myconn->parent->address,myconn->parent->port,current_hostgroup,myerr,mysql_error(myconn->mysql));
if(myerr!=0){
proxy_error("Detected a broken connection while setting LDAP USER VARIABLE on %s:%d hg %d : %d, %s\n",myconn->parent->address,myconn->parent->port,current_hostgroup,myerr,mysql_error(myconn->mysql));
}else{
proxy_error(
"Detected a broken connection while setting LDAP USER VARIABLE on %s:%d hg %d : %d, %s\n",
myconn->parent->address,
myconn->parent->port,
current_hostgroup,
myerr,
"Detected offline server prior to statement execution"
// if rc was '-1' but 'mysql_errno' is 0, it means that the connection
// wasn't stablished because the server was detected to be down, *prior*
// to the connection attempt, and the session should be destroyed.
if(myerr>=2000||myerr==0){
boolretry_conn=false;
// client error, serious
proxy_error("Detected a broken connection while setting SQL_LOG_BIN on %s:%d hg %d : %d, %s\n",myconn->parent->address,myconn->parent->port,current_hostgroup,myerr,mysql_error(myconn->mysql));
if(myerr!=0){
proxy_error("Detected a broken connection while setting SQL_LOG_BIN on %s:%d hg %d : %d, %s\n",myconn->parent->address,myconn->parent->port,current_hostgroup,myerr,mysql_error(myconn->mysql));
}else{
proxy_error(
"Detected a broken connection while setting SQL_LOG_BIN on %s:%d hg %d : %d, %s\n",
myconn->parent->address,
myconn->parent->port,
current_hostgroup,
myerr,
"Detected offline server prior to statement execution"
// if rc was '-1' but 'mysql_errno' is 0, it means that the connection
// wasn't stablished because the server was detected to be down, *prior*
// to the connection attempt, and the session should be destroyed.
if(myerr>=2000||myerr==0){
if(myerr==2019){
proxy_error("Client trying to set a charset/collation (%u) not supported by backend (%s:%d). Changing it to %u\n",charset,myconn->parent->address,myconn->parent->port,mysql_tracked_variables[SQL_CHARACTER_SET].default_value);
}
boolretry_conn=false;
// client error, serious
proxy_error("Detected a broken connection during SET NAMES on %s , %d : %d, %s\n",myconn->parent->address,myconn->parent->port,myerr,mysql_error(myconn->mysql));
if(myerr!=0){
proxy_error("Detected a broken connection during SET NAMES on %s , %d : %d, %s\n",myconn->parent->address,myconn->parent->port,myerr,mysql_error(myconn->mysql));
}else{
proxy_error(
"Detected a broken connection during SET NAMES on %s , %d : %d, %s\n",
myconn->parent->address,
myconn->parent->port,
myerr,
"Detected offline server prior to statement execution"
// if rc was '-1' but 'mysql_errno' is 0, it means that the connection
// wasn't stablished because the server was detected to be down, *prior*
// to the connection attempt, and the session should be destroyed.
if(myerr>=2000||myerr==0){
boolretry_conn=false;
// client error, serious
proxy_error("Detected a broken connection while setting %s on %s:%d hg %d : %d, %s\n",var_name,myconn->parent->address,myconn->parent->port,current_hostgroup,myerr,mysql_error(myconn->mysql));
if(myerr!=0){
proxy_error("Detected a broken connection while setting %s on %s:%d hg %d : %d, %s\n",var_name,myconn->parent->address,myconn->parent->port,current_hostgroup,myerr,mysql_error(myconn->mysql));
}else{
proxy_error(
"Detected a broken connection while setting %s on %s:%d hg %d : %d, %s\n",
var_name,
myconn->parent->address,
myconn->parent->port,
current_hostgroup,
myerr,
"Detected offline server prior to statement execution"
// if rc was '-1' but 'mysql_errno' is 0, it means that the connection
// wasn't stablished because the server was detected to be down, *prior*
// to the connection attempt, and the session should be destroyed.
if(myerr>=2000||myerr==0){
boolretry_conn=false;
// client error, serious
proxy_error("Detected a broken connection during setting MYSQL_OPTION_MULTI_STATEMENTS on %s , %d : %d, %s\n",myconn->parent->address,myconn->parent->port,myerr,mysql_error(myconn->mysql));
if(myerr!=0){
proxy_error("Detected a broken connection during setting MYSQL_OPTION_MULTI_STATEMENTS on %s , %d : %d, %s\n",myconn->parent->address,myconn->parent->port,myerr,mysql_error(myconn->mysql));
}else{
proxy_error(
"Detected a broken connection during setting MYSQL_OPTION_MULTI_STATEMENTS on %s , %d : %d, %s\n",
myconn->parent->address,
myconn->parent->port,
myerr,
"Detected offline server prior to statement execution"
// if rc was '-1' but 'mysql_errno' is 0, it means that the connection
// wasn't stablished because the server was detected to be down, *prior*
// to the connection attempt, and the session should be destroyed.
if(myerr>=2000||myerr==0){
boolretry_conn=false;
// client error, serious
proxy_error("Detected a broken connection during INIT_DB on %s , %d : %d, %s\n",myconn->parent->address,myconn->parent->port,myerr,mysql_error(myconn->mysql));
if(myerr!=0){
proxy_error("Detected a broken connection during INIT_DB on %s , %d : %d, %s\n",myconn->parent->address,myconn->parent->port,myerr,mysql_error(myconn->mysql));
}else{
proxy_error(
"Detected a broken connection during INIT_DB on %s , %d : %d, %s\n",
myconn->parent->address,
myconn->parent->port,
myerr,
"Detected offline server prior to statement execution"
// if rc was '-1' but 'mysql_errno' is 0, it means that the connection
// wasn't stablished because the server was detected to be down, *prior*
// to the connection attempt, and the session should be destroyed.
if(myerr>=2000||myerr==0){
boolretry_conn=false;
// client error, serious
proxy_error("Detected a broken connection during change user on %s, %d : %d, %s\n",myconn->parent->address,myconn->parent->port,myerr,mysql_error(myconn->mysql));
if(myerr!=0){
proxy_error("Detected a broken connection during change user on %s, %d : %d, %s\n",myconn->parent->address,myconn->parent->port,myerr,mysql_error(myconn->mysql));
}else{
proxy_error(
"Detected a broken connection during change user on %s, %d : %d, %s\n",
myconn->parent->address,
myconn->parent->port,
myerr,
"Detected offline server prior to statement execution"
// if rc was '-1' but 'mysql_errno' is 0, it means that the connection
// wasn't stablished because the server was detected to be down, *prior*
// to the connection attempt, and the session should be destroyed.
if(myerr>=2000||myerr==0){
boolretry_conn=false;
// client error, serious
proxy_error("Detected a broken connection during SET AUTOCOMMIT on %s , %d : %d, %s\n",myconn->parent->address,myconn->parent->port,myerr,mysql_error(myconn->mysql));
if(myerr!=0){
proxy_error("Detected a broken connection during SET AUTOCOMMIT on %s , %d : %d, %s\n",myconn->parent->address,myconn->parent->port,myerr,mysql_error(myconn->mysql));
}else{
proxy_error(
"Detected a broken connection during SET AUTOCOMMIT on %s , %d : %d, %s\n",
myconn->parent->address,
myconn->parent->port,
myerr,
"Detected offline server prior to statement execution"