List:General Discussion« Previous MessageNext Message »
From:Dan Nelson Date:September 23 1999 4:05pm
Subject:Pike MySQL module error handling
View as plain text  
I've got a little problem with the Pike Mysql module.  It seems to
reconnect to the database on any error:


  if (socket) {
    tmp = mysql_real_query(socket, query, qlen);
  if (!socket || (tmp < 0)) {
    socket = PIKE_MYSQL->socket;
    tmp = mysql_real_query(socket, query, qlen);

I'm having trouble holding locks since Pike seems to keep disconnecting
after every failed insert, etc.

Shouldn't a reconnect be done on CR_SERVER_GONE_ERROR or
CR_UNKNOWN_ERROR only?  Actually, now that I look at the source,
doesn't mysql_real_query do a reconnect if necessary anyway?

	Dan Nelson
Pike MySQL module error handlingDan Nelson23 Sep
  • Pike MySQL module error handlingMichael Widenius24 Sep