summaryrefslogtreecommitdiff
path: root/include/violite.h
diff options
context:
space:
mode:
authorunknown <SergeyV@selena.>2005-08-30 19:19:28 +0400
committerunknown <SergeyV@selena.>2005-08-30 19:19:28 +0400
commita8a5e98ec6a1170173d897b0da0d39866c79c7ba (patch)
treea7b1b47c1245fde5af125171897bbad4252ebc6a /include/violite.h
parentf658a7a7c3616c5edec3b1e0a79427ca98b20fdb (diff)
downloadmariadb-git-a8a5e98ec6a1170173d897b0da0d39866c79c7ba.tar.gz
Fixes bug #5588. vio_was_interrupted() function was added to detect
read timeout properly on win32. include/my_global.h: Added win32 specific socket timeout error code. include/violite.h: Added vio_was_interrupted function that returns true if operation was not completed due to timeout. sql/mini_client.cc: added a check that replication read was not completed due to timeout. sql/net_serv.cc: net->last_errno should be equal to ER_NET_READ_INTERRUPTED in case if read operation was not completed due to timeout. vio/vio.c: added initialization code for vio_was_interrupted() function. vio/viosocket.c: Added vio_was_interrupted function that returns true if operation was not completed due to timeout.
Diffstat (limited to 'include/violite.h')
-rw-r--r--include/violite.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/violite.h b/include/violite.h
index 6c4a42b1a53..23fd694d355 100644
--- a/include/violite.h
+++ b/include/violite.h
@@ -62,6 +62,8 @@ int vio_fastsend(Vio *vio);
int vio_keepalive(Vio *vio, my_bool onoff);
/* Whenever we should retry the last read/write operation. */
my_bool vio_should_retry(Vio *vio);
+/* Check that operation was timed out */
+my_bool vio_was_interrupted(Vio *vio);
/* Short text description of the socket for those, who are curious.. */
const char* vio_description(Vio *vio);
/* Return the type of the connection */
@@ -134,6 +136,7 @@ Vio *new_VioSSL(struct st_VioSSLAcceptorFd *fd, Vio *sd, int state);
#define vio_fastsend(vio) (vio)->fastsend(vio)
#define vio_keepalive(vio, set_keep_alive) (vio)->viokeepalive(vio, set_keep_alive)
#define vio_should_retry(vio) (vio)->should_retry(vio)
+#define vio_was_interrupted(vio) (vio)->was_interrupted(vio)
#define vio_close(vio) ((vio)->vioclose)(vio)
#define vio_peer_addr(vio, buf, prt) (vio)->peer_addr(vio, buf, prt)
#define vio_in_addr(vio, in) (vio)->in_addr(vio, in)
@@ -175,6 +178,7 @@ struct st_vio
my_bool (*peer_addr)(Vio*, char *, uint16*);
void (*in_addr)(Vio*, struct in_addr*);
my_bool (*should_retry)(Vio*);
+ my_bool (*was_interrupted)(Vio*);
int (*vioclose)(Vio*);
void (*timeout)(Vio*, unsigned int timeout);
void *ssl_arg;