Skip to content

Commit cd38b6a

Browse files
committed
Disabled one check in the test in unicode to reduce noise with valgrind
1 parent 51f21fe commit cd38b6a

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

driver/ma_dsn.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ my_bool MADB_ReadDSN(MADB_Dsn *Dsn, const char *KeyValue, my_bool OverWrite)
407407
{
408408
unsigned int KeyIdx= DsnKeys[i].IsAlias ? DsnKeys[i].DsnOffset : i;
409409

410-
if (SQLGetPrivateProfileString(Dsn->DSNName, DsnKeys[i].DsnKey, "", KeyVal, 1024, "ODBC.INI") > 0)
410+
if (SQLGetPrivateProfileString(Dsn->DSNName, DsnKeys[i].DsnKey, "", KeyVal, sizeof(KeyVal), "ODBC.INI") > 0)
411411
{
412412
if (!MADB_DsnStoreValue(Dsn, KeyIdx, KeyVal, OverWrite))
413413
return FALSE;

test/unicode.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,11 +258,14 @@ ODBC_TEST(sqlchar)
258258
FAIL_IF(SQLFetch(hstmt1) != SQL_NO_DATA_FOUND, "eof expected");
259259

260260
CHECK_STMT_RC(hstmt1, SQLFreeStmt(hstmt1, SQL_DROP));
261+
// This check creates lots of noise with valgrind from inside unixODBC
262+
#ifndef MEMCHECK_SKIP_TEST
261263
// We probably could do that in driver as well, TODO: but do we really need
262264
if (using_dm())
263265
{
264266
is_num(SQLFreeHandle(SQL_HANDLE_STMT, hstmt1), SQL_INVALID_HANDLE);
265267
}
268+
#endif
266269
CHECK_DBC_RC(hdbc1, SQLDisconnect(hdbc1));
267270
CHECK_DBC_RC(hdbc1, SQLFreeConnect(hdbc1));
268271

0 commit comments

Comments
 (0)