Changeset: 3da6dc78a5f8 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/3da6dc78a5f8
Modified Files:
        clients/odbc/tests/odbcconnect.c
Branch: Aug2024
Log Message:

Show errors that do not set any diagnostics


diffs (26 lines):

diff --git a/clients/odbc/tests/odbcconnect.c b/clients/odbc/tests/odbcconnect.c
--- a/clients/odbc/tests/odbcconnect.c
+++ b/clients/odbc/tests/odbcconnect.c
@@ -183,6 +183,7 @@ ensure_ok(SQLSMALLINT type, SQLHANDLE ha
        SQLCHAR explanation[256];
        SQLSMALLINT len;
 
+       bool printed_something = false;
        for (int i = 1; ; i++) {
                SQLRETURN diag_ret = SQLGetDiagRec(
                        type, handle, i,
@@ -194,9 +195,14 @@ ensure_ok(SQLSMALLINT type, SQLHANDLE ha
                        class = NULL;
                }
                printf("    - %s: %s\n", state, explanation);
+               printed_something = true;
        }
 
        if (!SQL_SUCCEEDED(ret) && ret != SQL_NEED_DATA) {
+               if (!printed_something) {
+                       printf("%s: %s\n", class, message);
+                       printf("    - failed without explanation\n");
+               }
                cleanup();
                exit(1);
        }
_______________________________________________
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org

Reply via email to