Changeset: 622e62254a3d for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/622e62254a3d
Modified Files:
clients/odbc/driver/SQLExecDirect.c
clients/odbc/driver/SQLExecute.c
clients/odbc/driver/SQLFetch.c
clients/odbc/driver/SQLMoreResults.c
Branch: Aug2024
Log Message:
Return proper SQLState HYT01 when we get a timeout during execution of a
command.
diffs (61 lines):
diff --git a/clients/odbc/driver/SQLExecDirect.c
b/clients/odbc/driver/SQLExecDirect.c
--- a/clients/odbc/driver/SQLExecDirect.c
+++ b/clients/odbc/driver/SQLExecDirect.c
@@ -93,9 +93,9 @@ ODBCExecDirect(ODBCStmt *stmt, const SQL
case MOK:
break;
case MTIMEOUT:
- /* Timeout expired / Communication link failure */
+ /* Connection timeout expired / Communication link failure */
timeout = msetting_long(stmt->Dbc->settings, MP_REPLY_TIMEOUT);
- addStmtError(stmt, timeout > 0 ? "HYT00" : "08S01",
mapi_error_str(stmt->Dbc->mid), 0);
+ addStmtError(stmt, timeout > 0 ? "HYT01" : "08S01",
mapi_error_str(stmt->Dbc->mid), 0);
return SQL_ERROR;
default:
err = mapi_result_error(hdl);
diff --git a/clients/odbc/driver/SQLExecute.c b/clients/odbc/driver/SQLExecute.c
--- a/clients/odbc/driver/SQLExecute.c
+++ b/clients/odbc/driver/SQLExecute.c
@@ -529,9 +529,9 @@ MNDBExecute(ODBCStmt *stmt)
case MOK:
break;
case MTIMEOUT:
- /* Timeout expired / Communication link failure */
+ /* Connection timeout expired / Communication link failure */
timeout = msetting_long(stmt->Dbc->settings, MP_REPLY_TIMEOUT);
- addStmtError(stmt, timeout > 0 ? "HYT00" : "08S01",
mapi_error_str(stmt->Dbc->mid), 0);
+ addStmtError(stmt, timeout > 0 ? "HYT01" : "08S01",
mapi_error_str(stmt->Dbc->mid), 0);
return SQL_ERROR;
default:
errstr = mapi_result_error(hdl);
diff --git a/clients/odbc/driver/SQLFetch.c b/clients/odbc/driver/SQLFetch.c
--- a/clients/odbc/driver/SQLFetch.c
+++ b/clients/odbc/driver/SQLFetch.c
@@ -101,10 +101,9 @@ MNDBFetch(ODBCStmt *stmt, SQLUSMALLINT *
case MTIMEOUT:
if (RowStatusArray)
WriteValue(RowStatusArray,
SQL_ROW_ERROR);
- /* Timeout expired / Communication
- * link failure */
+ /* Connection timeout expired / Communication
link failure */
timeout = msetting_long(stmt->Dbc->settings,
MP_REPLY_TIMEOUT);
- addStmtError(stmt, timeout > 0 ? "HYT00" :
"08S01", mapi_error_str(stmt->Dbc->mid), 0);
+ addStmtError(stmt, timeout > 0 ? "HYT01" :
"08S01", mapi_error_str(stmt->Dbc->mid), 0);
return SQL_ERROR;
default:
if (RowStatusArray)
diff --git a/clients/odbc/driver/SQLMoreResults.c
b/clients/odbc/driver/SQLMoreResults.c
--- a/clients/odbc/driver/SQLMoreResults.c
+++ b/clients/odbc/driver/SQLMoreResults.c
@@ -60,9 +60,9 @@ SQLMoreResults(SQLHSTMT StatementHandle)
addStmtError(stmt, "HY000", mapi_error_str(stmt->Dbc->mid), 0);
return SQL_ERROR;
case MTIMEOUT:
- /* Timeout expired / Communication link failure */
+ /* Connection timeout expired / Communication link failure */
timeout = msetting_long(stmt->Dbc->settings, MP_REPLY_TIMEOUT);
- addStmtError(stmt, timeout > 0 ? "HYT00" : "08S01",
mapi_error_str(stmt->Dbc->mid), 0);
+ addStmtError(stmt, timeout > 0 ? "HYT01" : "08S01",
mapi_error_str(stmt->Dbc->mid), 0);
return SQL_ERROR;
default:
return ODBCInitResult(stmt);
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]