From da2cc0cdf6ea9b1e689f41307ec118cf05579fc7 Mon Sep 17 00:00:00 2001 From: Tatjana Azundris Nuernberg Date: Fri, 17 Feb 2012 19:02:17 +0000 Subject: 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 | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') 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, -- cgit v1.2.1