Below is the list of changes that have just been committed into a local
4.1 repository of rburnett. When rburnett does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2227 05/05/05 17:17:57 rburnett@stripped +6 -0
Bug #9721 net_write_timeout not used on Windows
Added an extra parameter to all calls to timeout().
1 means we want to set the write timeout
0 means we wnat to set the read timeout
viossl.c:
Add which parameter to ssl timeout routine
vio_priv.h:
Added which parameter to vio_ignore_timeout and vio_ssl_timeout
violite.h:
Add which parameter to vio_timeout sigs
net_serv.cc:
Use proper which code in call to vio_timeout to set the proper timeout
viosocket.c:
Set the appropriate timeout in vio_timeout
BitKeeper/etc/logging_ok
1.381 05/05/05 17:17:57 rburnett@stripped +1 -0
Logging to logging@stripped accepted
vio/viossl.c
1.24 05/05/05 17:15:34 rburnett@stripped +2 -1
Add which parameter to ssl timeout routine
vio/vio_priv.h
1.3 05/05/05 17:14:18 rburnett@stripped +2 -2
Added which parameter to vio_ignore_timeout and vio_ssl_timeout
include/violite.h
1.40 05/05/05 17:13:57 rburnett@stripped +3 -3
Add which parameter to vio_timeout sigs
sql/net_serv.cc
1.73 05/05/05 17:11:55 rburnett@stripped +2 -2
Use proper which code in call to vio_timeout to set the proper timeout
vio/viosocket.c
1.29 05/05/05 17:11:21 rburnett@stripped +7 -2
Set the appropriate timeout in vio_timeout
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: rburnett
# Host: bk-internal.mysql.com
# Root: /users/rburnett/bug9721
--- 1.39/include/violite.h 2005-03-29 23:31:49 +02:00
+++ 1.40/include/violite.h 2005-05-05 17:13:57 +02:00
@@ -81,7 +81,7 @@
/* 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>
@@ -149,7 +149,7 @@
#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 */
@@ -189,7 +189,7 @@
void (*in_addr)(Vio*, struct in_addr*);
my_bool (*should_retry)(Vio*);
int (*vioclose)(Vio*);
- void (*timeout)(Vio*, unsigned int timeout);
+ void (*timeout)(Vio*, unsigned int which, unsigned int timeout);
void *ssl_arg;
#ifdef HAVE_SMEM
HANDLE handle_file_map;
--- 1.72/sql/net_serv.cc 2005-03-07 10:29:48 +01:00
+++ 1.73/sql/net_serv.cc 2005-05-05 17:11:55 +02:00
@@ -491,7 +491,7 @@
thr_alarm(&alarmed,(uint) net->write_timeout,&alarm_buff);
#else
alarmed=0;
- vio_timeout(net->vio, net->write_timeout);
+ vio_timeout(net->vio, 1, net->write_timeout);
#endif /* NO_ALARM */
pos=(char*) packet; end=pos+len;
@@ -684,7 +684,7 @@
if (net_blocking)
thr_alarm(&alarmed,net->read_timeout,&alarm_buff);
#else
- vio_timeout(net->vio, net->read_timeout);
+ vio_timeout(net->vio, 0, net->read_timeout);
#endif /* NO_ALARM */
pos = net->buff + net->where_b; /* net->packet -4 */
--- 1.380/BitKeeper/etc/logging_ok 2005-05-04 10:16:02 +02:00
+++ 1.381/BitKeeper/etc/logging_ok 2005-05-05 17:17:57 +02:00
@@ -195,6 +195,7 @@
ram@ram.(none)
ramil@stripped
ranger@stripped
+rburnett@stripped
rburnett@stripped
reggie@bob.(none)
reggie@mdk10.(none)
--- 1.2/vio/vio_priv.h 2003-12-15 16:58:12 +01:00
+++ 1.3/vio/vio_priv.h 2005-05-05 17:14:18 +02:00
@@ -23,7 +23,7 @@
#include <m_string.h>
#include <violite.h>
-void vio_ignore_timeout(Vio *vio, uint timeout);
+void vio_ignore_timeout(Vio *vio, uint which, uint timeout);
#ifdef HAVE_OPENSSL
#include "my_net.h" /* needed because of struct in_addr */
@@ -31,7 +31,7 @@
void vio_ssl_delete(Vio* vio);
int vio_ssl_read(Vio *vio,gptr buf, int size);
int vio_ssl_write(Vio *vio,const gptr buf,int size);
-void vio_ssl_timeout(Vio *vio, uint timeout);
+void vio_ssl_timeout(Vio *vio, uint which, uint timeout);
/* setsockopt TCP_NODELAY at IPPROTO_TCP level, when possible. */
int vio_ssl_fastsend(Vio *vio);
--- 1.23/vio/viossl.c 2005-01-25 21:06:54 +01:00
+++ 1.24/vio/viossl.c 2005-05-05 17:15:34 +02:00
@@ -421,7 +421,8 @@
void vio_ssl_timeout(Vio *vio __attribute__((unused)),
- uint timeout __attribute__((unused)))
+ uint which __attribute__((unused)),
+ uint timeout __attribute__((unused)))
{
/* Not yet implemented (non critical) */
}
--- 1.28/vio/viosocket.c 2005-02-15 13:43:25 +01:00
+++ 1.29/vio/viosocket.c 2005-05-05 17:11:21 +02:00
@@ -318,11 +318,16 @@
void vio_timeout(Vio *vio __attribute__((unused)),
- uint timeout __attribute__((unused)))
+ uint which __attribute__((unused)),
+ uint timeout __attribute__((unused)))
{
#ifdef __WIN__
ulong wait_timeout= (ulong) timeout * 1000;
- (void) setsockopt(vio->sd, SOL_SOCKET, SO_RCVTIMEO, (char*) &wait_timeout,
+ if (which == 0)
+ (void) setsockopt(vio->sd, SOL_SOCKET, SO_RCVTIMEO, (char*) &wait_timeout,
+ sizeof(wait_timeout));
+ else
+ (void) setsockopt(vio->sd, SOL_SOCKET, SO_SNDTIMEO, (char*) &wait_timeout,
sizeof(wait_timeout));
#endif /* __WIN__ */
}
| Thread |
|---|
| • bk commit into 4.1 tree (rburnett:1.2227) BUG#9721 | reggie | 5 May |