List:Commits« Previous MessageNext Message »
From:Tatiana Azundris Date:August 17 2009 3:38pm
Subject:Re: bzr commit into mysql-5.0-bugteam branch (azundris:2739) Bug#35132
View as plain text  

Hi Davi,

Thanks for your input!

Davi Arnaut wrote:
 > 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
 >
 >> @@ -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..

That, in all honesty, is some seriously surprising code. :)
Not the new stuff -- that just replaces the destructive mysql_close()
with a less destructive variant thereof --, but the surrounding logic.
Note that if --force is set, we do NOT reopen, ever. I have a case
open with monty (who wrote that bit) to clear whether it's a bug or
something arcane.  That said, I have a version here
http://lists.mysql.com/commits/80902 that rectifies all that (and adds
a shitload of comments while at it, I think we both coulda saved time
trying to understand the code had it been properly documented -- though
I may have error on the side of "too much" this time). Anyway, let's
hear monty first, he'll know.

regards,
Tatiana

-- 
Tatiana Azundris, Bugs Bunny * IRC/Skype: Azundris * azundris@stripped
Sun Microsystems GmbH, Sonnenallee 1, 85551 Kirchheim-Heimstetten
Geschaeftsfuehrer:  Thomas Schroeder, Wolfang Engels, Dr. Roland Boemer
Vorsitz des Aufsichtsrats: Martin Haering  HRB MUC 161028  49.011, 8.376
Thread
bzr commit into mysql-5.0-bugteam branch (azundris:2739) Bug#35132Tatiana A. Nurnberg21 Jul
  • Re: bzr commit into mysql-5.0-bugteam branch (azundris:2739) Bug#35132Davi Arnaut24 Jul
    • Re: bzr commit into mysql-5.0-bugteam branch (azundris:2739) Bug#35132Tatiana Azundris17 Aug
      • Re: bzr commit into mysql-5.0-bugteam branch (azundris:2739) Bug#35132Tatiana Azundris17 Aug