3 messages in com.mysql.lists.bugsRe: Bug with timeouts in the libmysql...| From | Sent On | Attachments |
|---|---|---|
| Dirk Bulinckx | 15 Mar 2002 08:40 | |
| Sinisa Milivojevic | 15 Mar 2002 08:49 | |
| Sinisa Milivojevic | 19 Mar 2002 07:27 |
| Subject: | Re: Bug with timeouts in the libmysql.dll![]() |
|---|---|
| From: | Sinisa Milivojevic (sin...@mysql.com) |
| Date: | 03/19/2002 07:27:33 AM |
| List: | com.mysql.lists.bugs |
Dirk Bulinckx writes:
I'm using VB to connect to a mySQL server and I can't get the connection to timeout.
What do I want to do exactly? Connect to server (max timeout of 5 seconds) if within 5 seconds I don't get a valid response from the server -> connection fails
How do I do this:
When I call the api_mysql_connect api I set TMYSQL.options.connection_timeout = 5
Result: If I try to connect to an IP that isn't up (no host on that IP) => connect api times out after about 21 seconds
If I try to connect to an IP that is UP but has no mySQL server listening to the mySQL port but another service listing to that port (used a dummy server that accepts connections but never sends data back) => connect api never times out (killed the app after about 20 minutes). (I can send the dummy server code is you want to use it to test with)
From what I can see OR I'm doing something wrong to set the timeout OR there is a bug within the connect API
Hi!
The above is not a bug.
Timeout works with our C API in such a manner that a state should be changed on the socket within the timeout. This is donw with select() function.
It is possible that your dummy server changes that state, but nothing happens thereafter.
-- Regards, __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic <sin...@mysql.com> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Fulltime Developer /_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus <___/ www.mysql.com




