Hi, I also tried that but the same result, mysql_ping doesn't return immediately. Any other hint please?
Thank you very much. Pedro Gelu Gogancea wrote: > Hi, > In this case i guess is better to execute mysql_ping() before mysql_query(). > > Regards, > > Gelu > _____________________________________________________ > G.NET SOFTWARE COMPANY > > Permanent e-mail address : [EMAIL PROTECTED] > [EMAIL PROTECTED] > ----- Original Message ----- > From: "Pedro Alvarez-Tabío" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Cc: "Gelu Gogancea" <[EMAIL PROTECTED]> > Sent: Tuesday, March 25, 2003 4:34 PM > Subject: Re: mysql_query to return immediately when connection lost > > > Hi, > > > > In this case I do have a DNS server. Any other hint please? I strongly > need > > mysql_query to return immediately if connection is lost with the server. > Any > > configuration parameter or similar on MySQL? Need to reconfigure something > in > > the OS? > > > > Thanks. > > Pedro > > > > Gelu Gogancea wrote: > > > > > Hi, > > > > > > This is usually happened becuase you don't have configured a DNS server > in > > > your network. > > > > > > Regards, > > > > > > Gelu > > > _____________________________________________________ > > > G.NET SOFTWARE COMPANY > > > > > > Permanent e-mail address : [EMAIL PROTECTED] > > > [EMAIL PROTECTED] > > > ----- Original Message ----- > > > From: "Pedro Alvarez-Tabío" <[EMAIL PROTECTED]> > > > To: <[EMAIL PROTECTED]> > > > Sent: Tuesday, March 25, 2003 1:47 PM > > > Subject: mysql_query to return immediately when connection lost > > > > > > > Hello, > > > > > > > > My client uses mysql_query to access a remote server. When the > > > > connection is lost (cable disconnected), mysql_query doesn't return > > > > immediately and I need a fast error return. > > > > > > > > I have tried executing mysql_options(mysql, MYSQL_OPT_CONNECT_TIMEOUT, > > > > &connectTimeout); (connectTimeout=1), always before connecting > > > > (mysql_real_connect). Also set mysql.reconnect to 0 before executing > > > > mysql_query. But no success. > > > > > > > > I need mysql_query to immediately return when a connection is lost in > > > > order the client to switch to the replicated server. > > > > > > > > Would you please tell me how can I do it? > > > > > > > > Thank you. > > > > Pedro > > > > > > > > > > > > -- > > > > > > > > |\ > > > > | \ > > > > | \ > > > > |___\ > > > > | | > > > > > > > > > > > > > > > > > > -- > > > MySQL General Mailing List > > > For list archives: http://lists.mysql.com/mysql > > > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] > > > > -- > > > > |\ > > | \ > > | \ > > |___\ > > | | > > > > > > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- |\ | \ | \ |___\ | |