summaryrefslogtreecommitdiff
path: root/include/violite.h
diff options
context:
space:
mode:
authorTatjana Azundris Nuernberg <tatjana.nuernberg@oracle.com>2012-02-17 19:02:17 +0000
committerTatjana Azundris Nuernberg <tatjana.nuernberg@oracle.com>2012-02-17 19:02:17 +0000
commitb6b47f8824f57d434a51358017725ebc05e47535 (patch)
treeb79a216e0f89da10e47a28ebeda751d7714a878b /include/violite.h
parentd79058cae68150fd661a8f5bd814a25b92614d6a (diff)
downloadmariadb-git-b6b47f8824f57d434a51358017725ebc05e47535.tar.gz
BUG#13431369 - MAIN.VARIABLES-NOTEMBEDDED CRASHES THE SERVER SPORADICALLY ON WINDOWS
On shutdown(), Windows can drop traffic still queued for sending even if that wasn't specifically requested. As a result, fatal errors (those after signaling which the server will drop the connection) were sometimes only seen as "connection lost" on the client side, because the server-side shutdown() erraneously discarded the correct error message before sending it. If on Windows, we now use the Windows API to access the (non-broken) equivalent of shutdown(). Backport from trunk include/violite.h: export mysql_socket_shutdown(). It lives in vio in the backport. sql/mysqld.cc: Go through our own shutdown() rather than straight to the POSIX one. vio/viosocket.c: Define mysql_socket_shutdown(). On UNIXoid systems, it's just a wrapper for shutdown(), but on Window, it uses DisconnectEx, which is magic.
Diffstat (limited to 'include/violite.h')
-rw-r--r--include/violite.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/violite.h b/include/violite.h
index 32354938e13..5facd0911b7 100644
--- a/include/violite.h
+++ b/include/violite.h
@@ -61,6 +61,9 @@ int vio_close_pipe(Vio * vio);
#define HANDLE void *
#endif /* __WIN__ */
+/* backport from 5.6 where it is part of PSI, not vio_*() */
+int mysql_socket_shutdown(my_socket mysql_socket, int how);
+
void vio_delete(Vio* vio);
int vio_close(Vio* vio);
void vio_reset(Vio* vio, enum enum_vio_type type,