summaryrefslogtreecommitdiff
path: root/libmysql
diff options
context:
space:
mode:
authorunknown <Sinisa@sinisa.nasamreza.org>2003-02-10 17:50:06 +0200
committerunknown <Sinisa@sinisa.nasamreza.org>2003-02-10 17:50:06 +0200
commitf67fe80eade847584bc0eae79d51b3b9345d7a57 (patch)
tree7d6ac1498aebd4e91d49bd52c52687bb6ba56f62 /libmysql
parent032e09cc9e304a8339236a3df92968faf891c43f (diff)
downloadmariadb-git-f67fe80eade847584bc0eae79d51b3b9345d7a57.tar.gz
connect timeout bug fix
libmysql/libmysql.c: This is a fix for a bug in connect_timeout. This bug manifested itself on operating systems that do support poll() system call, which resulted in a timeout twice the value specified. That is because timeout executed on both select() and poll().
Diffstat (limited to 'libmysql')
-rw-r--r--libmysql/libmysql.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index 179a942828c..af964bb9bfa 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -175,6 +175,9 @@ static int connect2(my_socket s, const struct sockaddr *name, uint namelen,
* implementations of select that don't adjust tv upon
* failure to reflect the time remaining
*/
+#ifdef HAVE_POLL
+ return(0);
+#endif
start_time = time(NULL);
for (;;)
{