mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Fixes bug #5588. Additions after merge from 4.0.
This commit is contained in:
@@ -602,7 +602,7 @@ net_safe_read(MYSQL *mysql)
|
||||
DBUG_PRINT("error",("Wrong connection or packet. fd: %s len: %d",
|
||||
vio_description(net->vio),len));
|
||||
#ifdef MYSQL_SERVER
|
||||
if (vio_errno(net->vio) == SOCKET_EINTR)
|
||||
if (vio_was_interrupted(net->vio))
|
||||
return (packet_error);
|
||||
#endif /*MYSQL_SERVER*/
|
||||
end_server(mysql);
|
||||
|
||||
@@ -50,6 +50,7 @@ void vio_reset(Vio* vio, enum enum_vio_type type,
|
||||
vio->fastsend =vio_fastsend;
|
||||
vio->viokeepalive =vio_keepalive;
|
||||
vio->should_retry =vio_should_retry;
|
||||
vio->was_interrupted=vio_was_interrupted;
|
||||
vio->vioclose =vio_close_pipe;
|
||||
vio->peer_addr =vio_peer_addr;
|
||||
vio->in_addr =vio_in_addr;
|
||||
@@ -69,6 +70,7 @@ void vio_reset(Vio* vio, enum enum_vio_type type,
|
||||
vio->fastsend =vio_fastsend;
|
||||
vio->viokeepalive =vio_keepalive;
|
||||
vio->should_retry =vio_should_retry;
|
||||
vio->was_interrupted=vio_was_interrupted;
|
||||
vio->vioclose =vio_close_shared_memory;
|
||||
vio->peer_addr =vio_peer_addr;
|
||||
vio->in_addr =vio_in_addr;
|
||||
@@ -88,7 +90,7 @@ void vio_reset(Vio* vio, enum enum_vio_type type,
|
||||
vio->fastsend =vio_ssl_fastsend;
|
||||
vio->viokeepalive =vio_ssl_keepalive;
|
||||
vio->should_retry =vio_ssl_should_retry;
|
||||
vio->was_interrupted=vio_was_interrupted;
|
||||
vio->was_interrupted=vio_ssl_was_interrupted;
|
||||
vio->vioclose =vio_ssl_close;
|
||||
vio->peer_addr =vio_ssl_peer_addr;
|
||||
vio->in_addr =vio_ssl_in_addr;
|
||||
|
||||
@@ -39,6 +39,8 @@ int vio_ssl_fastsend(Vio *vio);
|
||||
int vio_ssl_keepalive(Vio *vio, my_bool onoff);
|
||||
/* Whenever we should retry the last read/write operation. */
|
||||
my_bool vio_ssl_should_retry(Vio *vio);
|
||||
/* Check that operation was timed out */
|
||||
my_bool vio_ssl_was_interrupted(Vio *vio);
|
||||
/* When the workday is over... */
|
||||
int vio_ssl_close(Vio *vio);
|
||||
/* Return last error number */
|
||||
|
||||
@@ -197,9 +197,9 @@ vio_should_retry(Vio * vio __attribute__((unused)))
|
||||
|
||||
|
||||
my_bool
|
||||
vio_was_interrupted(Vio * vio __attribute__((unused)))
|
||||
vio_was_interrupted(Vio *vio __attribute__((unused)))
|
||||
{
|
||||
int en = socket_errno;
|
||||
int en= socket_errno;
|
||||
return (en == SOCKET_EAGAIN || en == SOCKET_EINTR ||
|
||||
en == SOCKET_EWOULDBLOCK || en == SOCKET_ETIMEDOUT);
|
||||
}
|
||||
|
||||
@@ -184,6 +184,15 @@ vio_ssl_should_retry(Vio * vio __attribute__((unused)))
|
||||
}
|
||||
|
||||
|
||||
my_bool
|
||||
vio_ssl_was_interrupted(Vio *vio __attribute__((unused)))
|
||||
{
|
||||
int en= socket_errno;
|
||||
return (en == SOCKET_EAGAIN || en == SOCKET_EINTR ||
|
||||
en == SOCKET_EWOULDBLOCK || en == SOCKET_ETIMEDOUT);
|
||||
}
|
||||
|
||||
|
||||
int vio_ssl_close(Vio * vio)
|
||||
{
|
||||
int r;
|
||||
|
||||
Reference in New Issue
Block a user