BUG#23703568 - IS CLIENT LIBRARY SUPPOSED TO RETRY EINTR INDEFINITELY OR NOT
Commit#ebd24626ca38e7fa1e3da2acdcf88540be70fabe obsoleted the THREAD and THREAD_SAFE_CLIENT preprocessor symbols. This is not removed in the sql/net_serv.cc thereby the code that retries on EINTR became dead code. Remove the THREAD_SAFE_CLIENT preprocessor directive form sql/net_serv.cc. Also check errno for EINTR only if there is an error in preceding read call.
This commit is contained in:
parent
fd31eea949
commit
2674cf91c5
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -676,13 +676,13 @@ net_real_write(NET *net,const uchar *packet, size_t len)
|
||||
my_progname);
|
||||
#endif /* EXTRA_DEBUG */
|
||||
}
|
||||
#if defined(THREAD_SAFE_CLIENT) && !defined(MYSQL_SERVER)
|
||||
#ifndef MYSQL_SERVER
|
||||
if (vio_errno(net->vio) == SOCKET_EINTR)
|
||||
{
|
||||
DBUG_PRINT("warning",("Interrupted write. Retrying..."));
|
||||
continue;
|
||||
}
|
||||
#endif /* defined(THREAD_SAFE_CLIENT) && !defined(MYSQL_SERVER) */
|
||||
#endif /* !defined(MYSQL_SERVER) */
|
||||
net->error= 2; /* Close socket */
|
||||
net->last_errno= (interrupted ? ER_NET_WRITE_INTERRUPTED :
|
||||
ER_NET_ERROR_ON_WRITE);
|
||||
@ -887,8 +887,9 @@ my_real_read(NET *net, size_t *complen)
|
||||
my_progname,vio_errno(net->vio));
|
||||
#endif /* EXTRA_DEBUG */
|
||||
}
|
||||
#if defined(THREAD_SAFE_CLIENT) && !defined(MYSQL_SERVER)
|
||||
if (vio_errno(net->vio) == SOCKET_EINTR)
|
||||
#ifndef MYSQL_SERVER
|
||||
if (static_cast<long>(length) < 0 &&
|
||||
vio_errno(net->vio) == SOCKET_EINTR)
|
||||
{
|
||||
DBUG_PRINT("warning",("Interrupted read. Retrying..."));
|
||||
continue;
|
||||
|
Loading…
x
Reference in New Issue
Block a user