Hi Monty,
>
> >>>>> "venu" == venu <[EMAIL PROTECTED]> writes:
>
> <cut>
>
> venu> MySQL/MyODBC does accept connection timeout. Here is the code
> venu> snippet from driver:
>
> venu> case SQL_ATTR_CONNECTION_TIMEOUT:
> venu> DBUG_RETURN(mysql_options(&dbc->mysql,
> MYSQL_OPT_CONNECT_TIMEOUT,
> venu> (const char *)((SQLUINTEGER)ValuePtr)));
> venu> break;
>
> venu> So, driver does set correctly. Make a note that, the
> value '0' means
> venu> default in ODBC, and that means no timedout.
>
> Venu, the above code is slightly wrong:
>
> To be 100 % correct, it should be:
>
> case SQL_ATTR_CONNECTION_TIMEOUT:
> {
> uint timeout_argument= *(SQLUINTEGER*) ValuePtr;
> DBUG_RETURN(mysql_options(&dbc->mysql, MYSQL_OPT_CONNECT_TIMEOUT,
> (const char *) &timeout_argument));
> }
Small update ..
This is true if ValuePtr is a SQLUINTEGER *, but it is
SQLUINTEGER.
Here is the spec contents for this one ..
An SQLUINTEGER value corresponding to the number of seconds to
wait for any request on the connection to complete before returning
to the application. The driver should return SQLSTATE HYT00 (Timeout
expired) anytime that it is possible to time out in a situation not
associated with query execution or login.
If ValuePtr is equal to 0 (the default), there is no timeout.
The SQLSetConnectAttr will get the SQLUINTEGER value as:
retcode = SQLSetConnectAttr(hdbc, SQL_ATTR_CONNECTION_TIMEOUT,
(void*)5, 0);
So, the possible option could be the caller(DM/App) is not passing
the correct data to the driver.
Richard, can you please send us the log file for this, so that
it will enable what is happening. I just even tested the behaviour
and it just works fine.
Regards, Venu
--
For technical support contracts, go to https://order.mysql.com
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Venu <[EMAIL PROTECTED]>
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Developer
/_/ /_/\_, /___/\___\_\___/ California, USA
<___/ www.mysql.com
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php