diff options
-rw-r--r-- | sql/net_serv.cc | 2 | ||||
-rw-r--r-- | vio/viosocket.c | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/sql/net_serv.cc b/sql/net_serv.cc index 29b8417c698..0ce0fa93f99 100644 --- a/sql/net_serv.cc +++ b/sql/net_serv.cc @@ -917,7 +917,7 @@ my_real_read(NET *net, size_t *complen, my_progname,vio_errno(net->vio)); } #ifndef MYSQL_SERVER - if (vio_errno(net->vio) == SOCKET_EINTR) + if (length != 0 && vio_errno(net->vio) == SOCKET_EINTR) { DBUG_PRINT("warning",("Interrupted read. Retrying...")); continue; diff --git a/vio/viosocket.c b/vio/viosocket.c index 5576dfc48d8..e724165612c 100644 --- a/vio/viosocket.c +++ b/vio/viosocket.c @@ -137,6 +137,9 @@ int vio_socket_io_wait(Vio *vio, enum enum_vio_io_event event) #define VIO_DONTWAIT 0 #endif +/* + returns number of bytes read or -1 in case of an error +*/ size_t vio_read(Vio *vio, uchar *buf, size_t size) { ssize_t ret; |