From: Date: September 7 2005 1:57pm Subject: bk commit into 4.1 tree (SergeyV:1.2410) BUG#5588 List-Archive: http://lists.mysql.com/internals/29421 X-Bug: 5588 Message-Id: <200509071157.j87BvRxn001687@selena.creware.com> 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.2410 05/09/07 15:57:14 SergeyV@selena. +5 -0 Fixes bug #5588. Additions after merge from 4.0. vio/viossl.c 1.27 05/09/07 15:57:07 SergeyV@selena. +9 -0 Added vio_ssl_was_interrupted() function that detects timed out operation properly on win32. vio/viosocket.c 1.34 05/09/07 15:57:06 SergeyV@selena. +2 -2 Minor changes to follow up the coding standard. vio/vio_priv.h 1.4 05/09/07 15:57:06 SergeyV@selena. +2 -0 Added vio_ssl_was_interrupted() function that detects timed out operation properly on win32. vio/vio.c 1.22 05/09/07 15:57:05 SergeyV@selena. +3 -1 Added vio_was_interrupted() function references to detect timed out operation properly on win32. sql-common/client.c 1.87 05/09/07 15:57:04 SergeyV@selena. +1 -1 Fixes bug #5588. checks if operation was timed out. # 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 --- 1.86/sql-common/client.c 2005-08-11 05:32:14 +04:00 +++ 1.87/sql-common/client.c 2005-09-07 15:57:04 +04:00 @@ -602,7 +602,7 @@ DBUG_PRINT("error",("Wrong connection or packet. fd: %s len: %d", vio_description(net->vio),len)); #ifdef MYSQL_SERVER - if (vio_errno(net->vio) == SOCKET_EINTR) + if (vio_was_interrupted(net->vio)) return (packet_error); #endif /*MYSQL_SERVER*/ end_server(mysql); --- 1.3/vio/vio_priv.h 2005-05-05 19:14:18 +04:00 +++ 1.4/vio/vio_priv.h 2005-09-07 15:57:06 +04:00 @@ -39,6 +39,8 @@ int vio_ssl_keepalive(Vio *vio, my_bool onoff); /* Whenever we should retry the last read/write operation. */ my_bool vio_ssl_should_retry(Vio *vio); +/* Check that operation was timed out */ +my_bool vio_ssl_was_interrupted(Vio *vio); /* When the workday is over... */ int vio_ssl_close(Vio *vio); /* Return last error number */ --- 1.21/vio/vio.c 2005-09-07 14:59:02 +04:00 +++ 1.22/vio/vio.c 2005-09-07 15:57:05 +04:00 @@ -50,6 +50,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_pipe; vio->peer_addr =vio_peer_addr; vio->in_addr =vio_in_addr; @@ -69,6 +70,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_shared_memory; vio->peer_addr =vio_peer_addr; vio->in_addr =vio_in_addr; @@ -88,7 +90,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->was_interrupted=vio_ssl_was_interrupted; vio->vioclose =vio_ssl_close; vio->peer_addr =vio_ssl_peer_addr; vio->in_addr =vio_ssl_in_addr; --- 1.26/vio/viossl.c 2005-07-07 02:36:02 +04:00 +++ 1.27/vio/viossl.c 2005-09-07 15:57:07 +04:00 @@ -184,6 +184,15 @@ } +my_bool +vio_ssl_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_ssl_close(Vio * vio) { int r; --- 1.33/vio/viosocket.c 2005-09-07 14:59:02 +04:00 +++ 1.34/vio/viosocket.c 2005-09-07 15:57:06 +04:00 @@ -197,9 +197,9 @@ my_bool -vio_was_interrupted(Vio * vio __attribute__((unused))) +vio_was_interrupted(Vio *vio __attribute__((unused))) { - int en = socket_errno; + int en= socket_errno; return (en == SOCKET_EAGAIN || en == SOCKET_EINTR || en == SOCKET_EWOULDBLOCK || en == SOCKET_ETIMEDOUT); }