summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorkroki/tomash@moonlight.intranet <>2006-09-18 22:02:06 +0400
committerkroki/tomash@moonlight.intranet <>2006-09-18 22:02:06 +0400
commit926106649f83984623c21910a2ce3ad982233f3e (patch)
tree239a22917b95abda36af68025cb1329170dc0517 /include
parent7d0b042ec5437485e6db72ae846be1432fee524d (diff)
downloadmariadb-git-926106649f83984623c21910a2ce3ad982233f3e.tar.gz
BUG#9678: Client library hangs after network communication failure
(back-port to 4.0) Socket timeouts in client library were used only on Windows. Additionally, in 4.0 write operations erroneously set read timeout. The solution is to use socket timeouts in client library on all systems were they are supported, and to differentiate between read and write timeouts. No test case is provided because it is impossible to simulate network failure in current test suite.
Diffstat (limited to 'include')
-rw-r--r--include/violite.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/violite.h b/include/violite.h
index 23fd694d355..ee19cbd62fe 100644
--- a/include/violite.h
+++ b/include/violite.h
@@ -77,7 +77,7 @@ my_bool vio_peer_addr(Vio* vio, char *buf, uint16 *port);
/* Remotes in_addr */
void vio_in_addr(Vio *vio, struct in_addr *in);
my_bool vio_poll_read(Vio *vio,uint timeout);
-void vio_timeout(Vio *vio,uint timeout);
+void vio_timeout(Vio *vio, uint which, uint timeout);
#ifdef HAVE_OPENSSL
#include <openssl/opensslv.h>
@@ -140,7 +140,7 @@ Vio *new_VioSSL(struct st_VioSSLAcceptorFd *fd, Vio *sd, int state);
#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)
-#define vio_timeout(vio, seconds) (vio)->timeout(vio, seconds)
+#define vio_timeout(vio, which, seconds) (vio)->timeout(vio, which, seconds)
#endif /* defined(HAVE_VIO) && !defined(DONT_MAP_VIO) */
/* This enumerator is used in parser - should be always visible */
@@ -180,7 +180,7 @@ struct st_vio
my_bool (*should_retry)(Vio*);
my_bool (*was_interrupted)(Vio*);
int (*vioclose)(Vio*);
- void (*timeout)(Vio*, unsigned int timeout);
+ void (*timeout)(Vio*, unsigned int which, unsigned int timeout);
void *ssl_arg;
#endif /* HAVE_VIO */
};