Skip to content

Commit bd98b9c

Browse files
committed
Trick to fix tests on macos-arm
Looks like tests and DM use different alignment and because of that 10th paramemter of SQLSpesialColumns of type short gets read incorrectly by the DM
1 parent c6b556c commit bd98b9c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

test/catalog2.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1897,7 +1897,7 @@ ODBC_TEST(odbc391)
18971897
SQLINTEGER len;
18981898
BOOL found= FALSE;
18991899
SQLCHAR dropUser[24 + sizeof(my_host)], createUser[52 + sizeof(my_host)], grantAll[40 + sizeof(my_host)], revokeSelect[48 + sizeof(my_host)];
1900-
SQLUSMALLINT nullable= (SQLUSMALLINT)((ServerNotOlderThan(Connection, 10, 10, 2) || IsMysql) ? SQL_NULLABLE : SQL_NO_NULLS);
1900+
SQLUINTEGER nullable= ((ServerNotOlderThan(Connection, 10, 10, 2) || IsMysql) ? SQL_NULLABLE : SQL_NO_NULLS);
19011901
SQLRETURN rc;
19021902
if (iOdbc() && OdbcVer == SQL_OV_ODBC2)
19031903
{
@@ -1946,7 +1946,7 @@ ODBC_TEST(odbc391)
19461946
CHECK_STMT_RC(Stmt, SQLFreeStmt(Stmt, SQL_CLOSE));
19471947

19481948
CHECK_STMT_RC(Stmt, SQLSpecialColumns(Stmt, SQL_ROWVER, dbname, (SQLSMALLINT)dbnameLen, NULL, 0,
1949-
tname, (SQLSMALLINT)tnameLen, SQL_SCOPE_TRANSACTION, nullable));
1949+
tname, (SQLSMALLINT)tnameLen, SQL_SCOPE_TRANSACTION, (SQLUSMALLINT)nullable));
19501950
rc= SQLFetch(Stmt);
19511951
if (rc == SQL_NO_DATA)
19521952
{

test/datetime.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ ODBC_TEST(t_bug9927)
725725
{
726726
SQLCHAR col[10];
727727
SQLRETURN rc;
728-
SQLUSMALLINT Nullable= (SQLUSMALLINT)((ServerNotOlderThan(Connection, 10, 10, 2) || IsMysql) ?
728+
SQLUINTEGER Nullable= ((ServerNotOlderThan(Connection, 10, 10, 2) || IsMysql) ?
729729
SQL_NULLABLE : SQL_NO_NULLS);
730730

731731
OK_SIMPLE_STMT(Stmt, "DROP TABLE IF EXISTS t_bug9927");
@@ -735,7 +735,7 @@ ODBC_TEST(t_bug9927)
735735
/* Not sure which exactly version that was introduced, but 10.11.2 is first ga */
736736
CHECK_STMT_RC(Stmt, SQLSpecialColumnsW(Stmt, SQL_ROWVER, NULL, 0,
737737
NULL, 0, LW("t_bug9927"), SQL_NTS,
738-
0, Nullable));
738+
0, (SQLUSMALLINT)Nullable));
739739
rc= SQLFetch(Stmt);
740740
if (rc == SQL_NO_DATA)
741741
{

0 commit comments

Comments
 (0)