List:Internals« Previous MessageNext Message »
From:Nicolas Baradakis Date:July 7 2005 4:48pm
Subject:Re: Libmysqlclient read/write timeout options
View as plain text  
Leandro Santi wrote:

> IIRC these socket options (i.e. SO_SNDTIMEO, SO_RCVTIMEO) are not
> available in Linux <= 2.2, so not every deployment could actually
> use this feature.

I searched a little and it seems that SO_RCVTIMEO and SO_SNDTIMEO are
supported since Linux 2.3.41. I think we can do something like that:

#ifdef SO_RCVTIMEO
  setsockopt (...)
#endif

In that way, the biggest majority will have the socket timeouts, and
it doesn't break anything for the others.

> Perhaps the patch could be modified so that network timeouts are
> detected using read and write-select operations when the operating
> system doesn't support such sockopts? This is IMHO a more portable
> approach.

I've read the comments under the bug #4143 and it seems that this
approach isn't welcome by the developpers of MySQL.

http://bugs.mysql.com/bug.php?id=4143

-- 
Nicolas Baradakis
Thread
Libmysqlclient read/write timeout optionsNicolas Baradakis7 Jul
  • Re: Libmysqlclient read/write timeout optionsLeandro Santi7 Jul
    • Re: Libmysqlclient read/write timeout optionsNicolas Baradakis7 Jul
      • Re: Libmysqlclient read/write timeout optionsLeandro Santi7 Jul
        • Re: Libmysqlclient read/write timeout optionsNicolas Baradakis8 Jul