diff --git a/sql/net_serv.cc b/sql/net_serv.cc index 8fa01ce..969637b 100644 --- a/sql/net_serv.cc +++ b/sql/net_serv.cc @@ -244,13 +244,21 @@ net_should_retry(NET *net, uint *retry_count MY_ATTRIBUTE((unused))) { my_bool retry; +#if !defined(MYSQL_SERVER) /* - In the non-thread safe client library, or in the server, - interrupted I/O operations are retried up to a limit. + In the thread safe client library, interrupted I/O operations + are always retried. Otherwise, its either a timeout or a + unrecoverable error. + */ + retry= vio_should_retry(net->vio); +#else + /* + In the server, interrupted I/O operations are retried up to a limit. In this scenario, pthread_kill can be used to wake up (interrupt) threads waiting for I/O. */ retry= vio_should_retry(net->vio) && ((*retry_count)++ < net->retry_count); +#endif return retry; }