Hi!
"venu" == venu <ve...@mysql.com> 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));
}
on the other hand, the old code should work as SQL_UINTEGER should be
of type uint.
If the old code crashes, it means that ValuePtr is not pointing at a
valid uint address, in which case the bug is in the application or the
driver manager.
Regards,
Monty