mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Make PACKET_TOO_LARGE error handling safer in client
This commit is contained in:
@ -460,19 +460,17 @@ simple_command(MYSQL *mysql,enum enum_server_command command, const char *arg,
|
|||||||
{
|
{
|
||||||
net->last_errno=CR_NET_PACKET_TOO_LARGE;
|
net->last_errno=CR_NET_PACKET_TOO_LARGE;
|
||||||
strmov(net->last_error,ER(net->last_errno));
|
strmov(net->last_error,ER(net->last_errno));
|
||||||
return(packet_error);
|
goto end;
|
||||||
}
|
}
|
||||||
else
|
end_server(mysql);
|
||||||
|
if (mysql_reconnect(mysql))
|
||||||
|
goto end;
|
||||||
|
if (net_write_command(net,(uchar) command,arg,
|
||||||
|
length ? length : (ulong) strlen(arg)))
|
||||||
{
|
{
|
||||||
end_server(mysql);
|
net->last_errno= CR_SERVER_GONE_ERROR;
|
||||||
if (mysql_reconnect(mysql) ||
|
strmov(net->last_error,ER(net->last_errno));
|
||||||
net_write_command(net,(uchar) command,arg,
|
goto end;
|
||||||
length ? length : (ulong) strlen(arg)))
|
|
||||||
{
|
|
||||||
net->last_errno=CR_SERVER_GONE_ERROR;
|
|
||||||
strmov(net->last_error,ER(net->last_errno));
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
result=0;
|
result=0;
|
||||||
|
Reference in New Issue
Block a user