diff options
author | unknown <SergeyV@selena.> | 2005-08-30 19:19:28 +0400 |
---|---|---|
committer | unknown <SergeyV@selena.> | 2005-08-30 19:19:28 +0400 |
commit | a8a5e98ec6a1170173d897b0da0d39866c79c7ba (patch) | |
tree | a7b1b47c1245fde5af125171897bbad4252ebc6a /sql | |
parent | f658a7a7c3616c5edec3b1e0a79427ca98b20fdb (diff) | |
download | mariadb-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 'sql')
-rw-r--r-- | sql/mini_client.cc | 2 | ||||
-rw-r--r-- | sql/net_serv.cc | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sql/mini_client.cc b/sql/mini_client.cc index 86d50dc9a0e..cd00db5c7df 100644 --- a/sql/mini_client.cc +++ b/sql/mini_client.cc @@ -399,7 +399,7 @@ mc_net_safe_read(MYSQL *mysql) { DBUG_PRINT("error",("Wrong connection or packet. fd: %s len: %d", vio_description(net->vio),len)); - if (socket_errno != SOCKET_EINTR) + if (!vio_was_interrupted(net->vio)) { mc_end_server(mysql); if (net->last_errno != ER_NET_PACKET_TOO_LARGE) diff --git a/sql/net_serv.cc b/sql/net_serv.cc index c527ee1eb76..1e66bfc3e19 100644 --- a/sql/net_serv.cc +++ b/sql/net_serv.cc @@ -700,7 +700,7 @@ my_real_read(NET *net, ulong *complen) len= packet_error; net->error=2; /* Close socket */ #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; |