Skip to content

Commit

Permalink
Rework SQLGetTypeInfo test for iODBC
Browse files Browse the repository at this point in the history
Reorder the SQLGetTypeInfo test to verify the metadata first,
then the data. This works around an apparent bug in iODBC, where
SQLNumResultCols fails when called after SQLFetch returns SQL_NO_DATA
but the cursor has not been closed yet.

Change-Id: Ic37ce0b3a5446abe93ca92d0ce10c3f4770b8258
  • Loading branch information
jduo committed Jul 24, 2022
1 parent bf1b7ee commit 355cc81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/test/src/catalogfunctions-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ TEST_F(CatalogFunctionsTest, GetTypeInfoTest){
"NULL\t12\t2147483647\t'\t'\tmax length\t1\t0\t3\tNULL\t0\tNULL\tVARCHAR\tNULL\tNULL\t12\tNULL\tNULL\tNULL\n",
"UNION\t12\t2147483647\t'\t'\tmax length\t1\t0\t3\tNULL\t0\tNULL\tVARCHAR\tNULL\tNULL\t12\tNULL\tNULL\tNULL\n",
"ARRAY\t12\t2147483647\t'\t'\tmax length\t1\t0\t3\tNULL\t0\tNULL\tVARCHAR\tNULL\tNULL\t12\tNULL\tNULL\tNULL\n"};
EXPECT_EQ(exp_result_meta, print_result_meta(hstmt_, &err_msg).value());
std::string result = get_result(hstmt_, &err_msg).value();
for (std::string type: exp_result) {
EXPECT_TRUE(result.find(type) != std::string::npos);
}
EXPECT_EQ(exp_result_meta, print_result_meta(hstmt_, &err_msg).value());
}

TEST_F(CatalogFunctionsTest, GetTablesTest){
Expand Down

0 comments on commit 355cc81

Please sign in to comment.