summaryrefslogtreecommitdiff
path: root/vio
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2009-09-24 23:42:43 -0700
committerIgor Babaev <igor@askmonty.org>2009-09-24 23:42:43 -0700
commitd210e5fde6ea98e4d7363868e34733ab1c6cf00f (patch)
treefdfa8276ca43c2ff05a989a7117e7be0c103dfae /vio
parentcb4121f26f7de18df808e2c1dbd4c13108fa3a16 (diff)
downloadmariadb-git-d210e5fde6ea98e4d7363868e34733ab1c6cf00f.tar.gz
Took care of mysql test suite failures on Windows.
mysql-test/suite/rpl/t/rpl_binlog_corruption.test: Disabled the test for Windows (see bug #47639) mysql-test/suite/rpl/t/rpl_killed_ddl.test: Disabled the test for Windows (see bug #47638) vio/viosocket.c: Added an implementation of vio_poll_read for Windows. Winsock does not support the poll function. So the existing generic implementation of vio_poll_read could not be used for Windows.
Diffstat (limited to 'vio')
-rw-r--r--vio/viosocket.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/vio/viosocket.c b/vio/viosocket.c
index 4c6cc428c52..fead2ca7c1c 100644
--- a/vio/viosocket.c
+++ b/vio/viosocket.c
@@ -361,7 +361,20 @@ void vio_in_addr(Vio *vio, struct in_addr *in)
my_bool vio_poll_read(Vio *vio,uint timeout)
{
#ifndef HAVE_POLL
+#if __WIN__
+ int res;
+ struct fd_set fds;
+ struct timeval tv;
+ DBUG_ENTER("vio_poll");
+ fds.fd_count= 1;
+ fds.fd_array[0]= vio->sd;
+ tv.tv_sec= timeout;
+ tv.tv_usec= 0;
+ res= select(1, &fds, NULL, NULL, &tv) ? 0 : 1;
+ DBUG_RETURN(res);
+#else
return 0;
+#endif
#else
struct pollfd fds;
int res;