On 7/7/07, Ben Noordhuis <[EMAIL PROTECTED]> wrote:
I'm not aware of a reliable workaround for earlier versions of
MySQL, unfortunately.

Allow me to reply to myself. If you can live with a slight performance
impact, the code snippet below should help you to reconnect in a
controlled fashion. Hope this helps.

switch (mysql_query(&mysql, "SELECT 1")) {
case 0:
   mysql_free_result(mysql_use_result(&mysql));
   break;
case CR_SERVER_GONE_ERROR:
   /* reinitialize */
   break;
default:
   /* handle error */
}

Reply via email to