Changeset: 4c14a4f23013 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/4c14a4f23013 Modified Files: clients/odbc/tests/ODBCmetadata.c Branch: default Log Message:
Stabalize output of test of executing a TRACE statement via ODBC. The WVARCHAR length of the "statement" column changes (from 249 to 248 or 251 or 258) for 3 platforms. This shows as errors on testweb. We now suppress this specific length value. diffs (54 lines): diff --git a/clients/odbc/tests/ODBCmetadata.c b/clients/odbc/tests/ODBCmetadata.c --- a/clients/odbc/tests/ODBCmetadata.c +++ b/clients/odbc/tests/ODBCmetadata.c @@ -186,6 +186,11 @@ compareResultOptClose(SQLHANDLE stmt, SQ check(ret, SQL_HANDLE_STMT, stmt, "SQLRowCount()"); pos += snprintf(outp + pos, outp_len - pos, "Resultset with %"PRId64" rows\n", (int64_t) rows); + /* detect if special handling of data returned by second TRACE resultset is needed */ + if (columns == 2 && (strncmp("TRACE(2) ", functionname, 9) == 0)) { + replaceTraceData = 1; + } + /* get Result Column Names and print them */ for (col = 1; col <= columns; col++) { ret = SQLDescribeCol(stmt, col, (SQLCHAR *) buf, sizeof(buf), @@ -214,7 +219,7 @@ compareResultOptClose(SQLHANDLE stmt, SQ case SQL_BINARY: case SQL_VARBINARY: case SQL_LONGVARBINARY: - if (columnSize != 0) { + if (columnSize != 0 && replaceTraceData == 0) { if (decimalDigits != 0) { pos += snprintf(outp + pos, outp_len - pos, "(%d,%d)", (int) columnSize, (int) decimalDigits); @@ -239,11 +244,6 @@ compareResultOptClose(SQLHANDLE stmt, SQ } } - /* detect if special handling of data returned by second TRACE resultset is needed */ - if (columns == 2 && (strncmp("TRACE(2) ", functionname, 9) == 0)) { - replaceTraceData = 1; - } - /* Loop through the rows in the result-set */ ret = SQLFetch(stmt); check(ret, SQL_HANDLE_STMT, stmt, "SQLFetch(1)"); @@ -1594,7 +1594,7 @@ main(int argc, char **argv) "Resultset with 2 columns\n" "Resultset with 12 rows\n" "usec statement\n" - "BIGINT WVARCHAR(249)\n" + "BIGINT WVARCHAR\n" "4 variable output\n" "4 variable output\n" "4 variable output\n" @@ -1611,7 +1611,7 @@ main(int argc, char **argv) "Resultset with 2 columns\n" "Resultset with 11 rows\n" "usec statement\n" - "BIGINT WVARCHAR(240)\n" + "BIGINT WVARCHAR\n" "4 variable output\n" "4 variable output\n" "4 variable output\n" _______________________________________________ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org