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


--

|\
| \
|  \
|___\
| |


Reply via email to