Below is the list of changes that have just been committed into a local
4.1 repository of sergeyv. When sergeyv 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.2409 05/09/07 14:59:41 SergeyV@selena. +7 -0
Merge selena.:H:/MYSQL/src/#05588-mysql-4.0
into selena.:H:/MYSQL/src/#05588-mysql-4.1
include/my_global.h
1.101 05/09/07 14:59:36 SergeyV@selena. +0 -0
SCCS merged
vio/viosocket.c
1.33 05/09/07 14:59:02 SergeyV@selena. +0 -0
Auto merged
vio/vio.c
1.21 05/09/07 14:59:02 SergeyV@selena. +0 -0
Auto merged
sql/net_serv.cc
1.75 05/09/07 14:59:02 SergeyV@selena. +0 -0
Auto merged
include/violite.h
1.41 05/09/07 14:59:02 SergeyV@selena. +0 -0
Auto merged
BitKeeper/deleted/.del-mini_client.cc~8677895ec8169183
1.72 05/09/07 14:59:01 SergeyV@selena. +1 -2
Auto merged
BitKeeper/deleted/.del-lib_vio.c~d779731a1e391220
1.21 05/09/07 14:59:01 SergeyV@selena. +0 -0
Auto merged
BitKeeper/deleted/.del-mini_client.cc~8677895ec8169183
1.48.8.2 05/09/07 14:59:01 SergeyV@selena. +0 -0
Merge rename: sql/mini_client.cc -> BitKeeper/deleted/.del-mini_client.cc~8677895ec8169183
BitKeeper/deleted/.del-lib_vio.c~d779731a1e391220
1.11.2.2 05/09/07 14:59:01 SergeyV@selena. +0 -0
Merge rename: libmysqld/lib_vio.c -> BitKeeper/deleted/.del-lib_vio.c~d779731a1e391220
# 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: SergeyV
# Host: selena.
# Root: H:/MYSQL/src/#05588-mysql-4.1/RESYNC
--- 1.40/include/violite.h 2005-05-05 19:13:57 +04:00
+++ 1.41/include/violite.h 2005-09-07 14:59:02 +04:00
@@ -68,6 +68,8 @@
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 */
@@ -146,6 +148,7 @@
#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)
@@ -188,6 +191,7 @@
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 which, unsigned int timeout);
void *ssl_arg;
--- 1.74/sql/net_serv.cc 2005-07-12 18:56:30 +04:00
+++ 1.75/sql/net_serv.cc 2005-09-07 14:59:02 +04:00
@@ -759,7 +759,7 @@
net->error= 2; /* Close socket */
net->report_error= 1;
#ifdef MYSQL_SERVER
- net->last_errno= (interrupted ? ER_NET_READ_INTERRUPTED :
+ net->last_errno= (vio_was_interrupted(net->vio) ? ER_NET_READ_INTERRUPTED :
ER_NET_READ_ERROR);
#endif
goto end;
--- 1.100/include/my_global.h 2005-08-31 21:08:52 +04:00
+++ 1.101/include/my_global.h 2005-09-07 14:59:36 +04:00
@@ -801,6 +801,7 @@
#define socket_errno WSAGetLastError()
#define SOCKET_EINTR WSAEINTR
#define SOCKET_EAGAIN WSAEINPROGRESS
+#define SOCKET_ETIMEDOUT WSAETIMEDOUT
#define SOCKET_EWOULDBLOCK WSAEWOULDBLOCK
#define SOCKET_ENFILE ENFILE
#define SOCKET_EMFILE EMFILE
@@ -808,6 +809,7 @@
#define socket_errno sock_errno()
#define SOCKET_EINTR SOCEINTR
#define SOCKET_EAGAIN SOCEINPROGRESS
+#define SOCKET_ETIMEDOUT SOCKET_EINTR
#define SOCKET_EWOULDBLOCK SOCEWOULDBLOCK
#define SOCKET_ENFILE SOCENFILE
#define SOCKET_EMFILE SOCEMFILE
@@ -817,6 +819,7 @@
#define closesocket(A) close(A)
#define SOCKET_EINTR EINTR
#define SOCKET_EAGAIN EAGAIN
+#define SOCKET_ETIMEDOUT SOCKET_EINTR
#define SOCKET_EWOULDBLOCK EWOULDBLOCK
#define SOCKET_ENFILE ENFILE
#define SOCKET_EMFILE EMFILE
--- 1.11.2.1/libmysqld/lib_vio.c 2005-09-06 22:56:11 +04:00
+++ 1.21/BitKeeper/deleted/.del-lib_vio.c~d779731a1e391220 2005-09-07 14:59:01 +04:00
@@ -20,6 +20,7 @@
we are working on. In this case we should just return read errors from
the file descriptior.
*/
+#ifdef DUMMY
#include <my_global.h>
#include "mysql_embed.h"
@@ -30,7 +31,6 @@
#include <errno.h>
#include <my_sys.h>
#include <violite.h>
-#include <my_sys.h>
#include <my_net.h>
#include <m_string.h>
#include <assert.h>
@@ -41,14 +41,7 @@
struct st_vio
{
- my_socket sd; /* my_socket - real or imaginary */
- HANDLE hPipe;
- my_bool localhost; /* Are we from localhost? */
- int fcntl_mode; /* Buffered fcntl(sd,F_GETFL) */
- struct sockaddr_in local; /* Local internet address */
- struct sockaddr_in remote; /* Remote internet address */
enum enum_vio_type type; /* Type of connection */
- char desc[30]; /* String description */
void *dest_thd;
char *packets, **last_packet;
char *where_in_packet, *end_of_packet;
@@ -56,6 +49,7 @@
MEM_ROOT root;
};
+
/* Initialize the communication buffer */
Vio *vio_new(my_socket sd, enum enum_vio_type type, my_bool localhost)
@@ -68,6 +62,7 @@
init_alloc_root(&vio->root, 8192, 8192);
vio->root.min_malloc = sizeof(char *) + 4;
vio->last_packet = &vio->packets;
+ vio->type = type;
}
DBUG_RETURN(vio);
}
@@ -232,4 +227,25 @@
uint timeout __attribute__((unused)))
{
}
+
+int create_vio(NET *net, int separate_thread)
+{
+ Vio * v = net->vio;
+ if (!v)
+ {
+ v = vio_new(0, separate_thread ? VIO_CLOSED : VIO_TYPE_TCPIP, 0);
+ net->vio = v;
+ }
+ return !v;
+}
+
+void set_thd(Vio *v, void *thd)
+{
+ if (v)
+ {
+ v -> dest_thd = thd;
+ }
+}
#endif /* HAVE_VIO */
+#endif /* DUMMY */
+
--- 1.20/vio/vio.c 2005-07-12 18:56:30 +04:00
+++ 1.21/vio/vio.c 2005-09-07 14:59:02 +04:00
@@ -88,6 +88,7 @@
vio->fastsend =vio_ssl_fastsend;
vio->viokeepalive =vio_ssl_keepalive;
vio->should_retry =vio_ssl_should_retry;
+ vio->was_interrupted=vio_was_interrupted;
vio->vioclose =vio_ssl_close;
vio->peer_addr =vio_ssl_peer_addr;
vio->in_addr =vio_ssl_in_addr;
@@ -105,6 +106,7 @@
vio->fastsend =vio_fastsend;
vio->viokeepalive =vio_keepalive;
vio->should_retry =vio_should_retry;
+ vio->was_interrupted=vio_was_interrupted;
vio->vioclose =vio_close;
vio->peer_addr =vio_peer_addr;
vio->in_addr =vio_in_addr;
--- 1.32/vio/viosocket.c 2005-07-12 18:56:30 +04:00
+++ 1.33/vio/viosocket.c 2005-09-07 14:59:02 +04:00
@@ -196,6 +196,15 @@
}
+my_bool
+vio_was_interrupted(Vio * vio __attribute__((unused)))
+{
+ int en = socket_errno;
+ return (en == SOCKET_EAGAIN || en == SOCKET_EINTR ||
+ en == SOCKET_EWOULDBLOCK || en == SOCKET_ETIMEDOUT);
+}
+
+
int vio_close(Vio * vio)
{
int r=0;
| Thread |
|---|
| • bk commit into 4.1 tree (SergeyV:1.2409) | sergeyv | 7 Sep |