set maximum query run time to 30 seconds at least on drivers that support SQL_ATTR_QUERY_TIMEOUT
This commit is contained in:
parent
2c595a6ce0
commit
5bb525e1ea
|
@ -165,6 +165,8 @@ static int db_is_up(switch_odbc_handle_t *handle)
|
|||
goto error;
|
||||
}
|
||||
|
||||
SQLSetStmtAttr(stmt, SQL_ATTR_QUERY_TIMEOUT, (SQLPOINTER)30, 0);
|
||||
|
||||
if (SQLPrepare(stmt, sql, SQL_NTS) != SQL_SUCCESS) {
|
||||
code = __LINE__;
|
||||
goto error;
|
||||
|
|
Loading…
Reference in New Issue