From: Warren Young Date: November 25 2009 9:00pm Subject: Re: set_option ( ReconnectOption ) List-Archive: http://lists.mysql.com/plusplus/8782 Message-Id: <4B0D9AE8.3090502@etr-usa.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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.