Changeset: 51f4a26c833c for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/51f4a26c833c
Modified Files:
        clients/odbc/driver/SQLConnect.c
Branch: Aug2024
Log Message:

return SQLState HYT00 when login timeout period expired during connecting.


diffs (20 lines):

diff --git a/clients/odbc/driver/SQLConnect.c b/clients/odbc/driver/SQLConnect.c
--- a/clients/odbc/driver/SQLConnect.c
+++ b/clients/odbc/driver/SQLConnect.c
@@ -461,9 +461,13 @@ MNDBConnectSettings(ODBCDbc *dbc, const 
        if (mid == NULL || mapi_error(mid)) {
                const char *error_state;
                const char *error_explanation = mid ? mapi_error_str(mid) : 
NULL;
-               if (error_explanation && strncmp(error_explanation, 
"InvalidCredentialsException:", 28) == 0)
-                       error_state = "28000";
-               else
+               if (error_explanation) {
+                       if (strncmp(error_explanation, 
"InvalidCredentialsException:", 28) == 0)
+                               error_state = "28000";
+                       else
+                       if (strncmp(error_explanation, "could not connect: 
Connection timed out", 39) == 0)
+                               error_state = "HYT00";
+               } else
                        error_state = "08001";
                addDbcError(dbc, error_state, error_explanation, 0);
                if (mid)
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to