List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:July 29 1999 6:47pm
Subject:Re[2]: mysql_ping() problem
View as plain text  
>>>>> "BAUMEISTER" == BAUMEISTER Alexandre <alex@stripped>
> writes:

>>> >  So  I  though that Mysql_ping() should not hang. If the server can't
>>> >  be touch, shouldn't the connection be considered as down ? Shouldn't
>>> >  Mysql_ping() attempt a reconnection ?

einne> my solution to this was to set an alarm (with an appropriate timeout)
einne> before calling mysql_ping, and disconnect/try reconnecting in the signal
einne> handler.

einne> this works from perl DBI as well, i'm currently using this method in a 
einne> few of my scripts.

BAUMEISTER>   Thanks for the tip.

BAUMEISTER>   Shouldn't  Mysql_ping()  do  that  on  it's own ? It would be really
BAUMEISTER>   great and would simplify things.



mysql_ping() will issue a write on the opened connection and if it
gets some error it will try to reconnect.

Could you recompile mysql with --with-debug and debug libmysql.c and
find out why 'simple_command' in libmysql.c doesn't notice this


mysql_ping() problemBAUMEISTER Alexandre13 Jul
  • mysql_ping() problemsinisa14 Jul
    • Re: mysql_ping() problemBAUMEISTER Alexandre15 Jul
      • Re: mysql_ping() problemPaul DuBois15 Jul
        • Re: mysql_ping() problemelble15 Jul
          • Re[2]: mysql_ping() problemBAUMEISTER Alexandre16 Jul
            • Re[2]: mysql_ping() problemMichael Widenius29 Jul
        • Re[2]: mysql_ping() problemBAUMEISTER Alexandre16 Jul
          • Re[2]: mysql_ping() problemPaul DuBois16 Jul
            • Re[3]: mysql_ping() problemBAUMEISTER Alexandre19 Jul