From: Davi Arnaut Date: July 23 2009 10:54pm Subject: Re: bzr commit into mysql-5.0-bugteam branch (azundris:2739) Bug#35132 List-Archive: http://lists.mysql.com/commits/79210 Message-Id: <4A68EA1A.2090008@Sun.COM> MIME-Version: 1.0 Content-Type: text/plain; CHARSET=US-ASCII; format=flowed Content-Transfer-Encoding: 7BIT Hi Tatiana, On 7/21/09 11:34 AM, Tatiana A. Nurnberg wrote: > #At file:///Users/tnurnberg/forest/35132/50-35132/ based on revid:timothy.smith@stripped > > 2739 Tatiana A. Nurnberg 2009-07-21 > Bug#35132: MySQLadmin --wait ping always crashes on Windows systems > [..] > @@ -387,7 +388,14 @@ int main(int argc,char *argv[]) > { > if (option_wait&& !interrupted) > { > - mysql_close(&mysql); > + if (mysql.net.vio != 0) > + { > + free_old_query(&mysql); > + mysql.status=MYSQL_STATUS_READY; /* Force command */ > + mysql.reconnect=0; > + simple_command(&mysql,COM_QUIT,NullS,0,1); > + end_server(&mysql); /* Sets mysql->net.vio= 0 */ > + } Why this needed? It seems we should only attempt to reconnect if the connection is broken. Otherwise, the same connection could be used..