diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
--- a/sql/mysqld.cc 2011-04-09 18:48:53.000000000 +0400
+++ b/sql/mysqld.cc 2011-04-09 18:48:54.000000000 +0400
-@@ -5044,6 +5044,10 @@
+@@ -5040,6 +5040,10 @@
DBUG_PRINT("error",("Too many connections"));
close_connection(thd, ER_CON_COUNT_ERROR);
delete thd;
DBUG_VOID_RETURN;
}
-@@ -5424,6 +5428,10 @@
+@@ -5420,6 +5424,10 @@
if (!(thd->net.vio= vio_new_win32pipe(hConnectedPipe)) ||
my_net_init(&thd->net, thd->net.vio))
{
close_connection(thd, ER_OUT_OF_RESOURCES);
delete thd;
continue;
-@@ -5619,6 +5627,10 @@
+@@ -5615,6 +5623,10 @@
event_conn_closed)) ||
my_net_init(&thd->net, thd->net.vio))
{