Skip to content

GH-50578: [C++][FlightRPC][ODBC] Always return SQL_NO_DATA from GetMoreResults - #50700

Draft
amoeba wants to merge 2 commits into
apache:mainfrom
amoeba:flightsqlodbc-GetMoreResults
Draft

GH-50578: [C++][FlightRPC][ODBC] Always return SQL_NO_DATA from GetMoreResults#50700
amoeba wants to merge 2 commits into
apache:mainfrom
amoeba:flightsqlodbc-GetMoreResults

Conversation

@amoeba

@amoeba amoeba commented Jul 29, 2026

Copy link
Copy Markdown
Member

Draft.

Rationale for this change

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

No.

@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #50578 has no components, please add labels for components.

@@ -784,11 +784,7 @@ SQLRETURN ODBCStatement::GetData(SQLSMALLINT record_number, SQLSMALLINT c_type,

@alinaliBQ alinaliBQ Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CI hasn't run the C++ Extra tests, so I'm not sure whether TestSQLMoreResultsWithoutQuery will fail. If the driver manager doesn't return HY010 for SQLMoreResults, you may need to update TestSQLMoreResultsWithoutQuery to expect SQL_NO_DATA on all platforms.

TYPED_TEST(StatementTest, TestSQLMoreResultsWithoutQuery) {
#ifdef __linux__
ASSERT_EQ(SQL_NO_DATA, SQLMoreResults(this->stmt));
#else // Windows & Mac
// Verify function sequence error state is reported when SQLMoreResults is called
// without executing any queries
ASSERT_EQ(SQL_ERROR, SQLMoreResults(this->stmt));
VerifyOdbcErrorState(SQL_HANDLE_STMT, this->stmt, kErrorStateHY010);
#endif
}

to:

TYPED_TEST(StatementTest, TestSQLMoreResultsWithoutQuery) {
  ASSERT_EQ(SQL_NO_DATA, SQLMoreResults(this->stmt));
}

edit: fixed typo

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. I pushed without the test fix to verify the test fails in CI since I don't have the tests running locally.

@amoeba amoeba added the CI: Extra: C++ Run extra C++ CI label Jul 29, 2026
@github-actions github-actions Bot added awaiting committer review Awaiting committer review and removed awaiting review Awaiting review labels Jul 29, 2026
@amoeba

amoeba commented Jul 29, 2026

Copy link
Copy Markdown
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants