List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:November 25 2009 9:00pm
Subject:Re: set_option ( ReconnectOption )
View as plain text  
Dino Korah wrote:
> reconnect -> re-initialise-connection -> do-processing.

Are you certain you need to re-send the connection setup SQL commands 
after reconnection?  The whole point of automatic reconnection is that 
the connection should be put back in the same state it was in before it 
was dropped.  I don't know one way or the other; have you tested it?

If that doesn't happen, then I would suggest using periodic 
Connection::ping() calls instead of ReconnectOption.  When ping() fails, 
reconnect and reinit.  You also have to check query failure if you go 
down this path, however, because the DB server could go away in between 
a ping() success and the Query::execute()/store()/use() call.
Thread
set_option ( ReconnectOption )Dino Korah25 Nov
  • Re: set_option ( ReconnectOption )Warren Young25 Nov
    • Re: set_option ( ReconnectOption )Dino Korah25 Nov
      • Re: set_option ( ReconnectOption )Warren Young25 Nov
        • Re: set_option ( ReconnectOption )Dino Korah25 Nov
          • Re: set_option ( ReconnectOption )Warren Young25 Nov
            • Re: set_option ( ReconnectOption )Dino Korah26 Nov
              • Re: set_option ( ReconnectOption )Warren Young26 Nov
                • Re: set_option ( ReconnectOption )Dino Korah26 Nov
                  • Re: set_option ( ReconnectOption )Warren Young26 Nov
                • Re: set_option ( ReconnectOption )Dino Korah26 Nov
                  • Re: set_option ( ReconnectOption )Warren Young26 Nov
            • Re: set_option ( ReconnectOption )Dino Korah26 Nov
              • RE: set_option ( ReconnectOption )F.N. Bruggeman26 Nov