Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the behavior of SQLGetData for cases when the size of output buffer is 0 #316

Merged

Conversation

traceon
Copy link
Collaborator

@traceon traceon commented Sep 11, 2020

Copy link
Collaborator

@Enmk Enmk left a comment

Choose a reason for hiding this comment

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

LGTM

SQLTCHAR col[100] = {};
SQLLEN col_ind = 0;

SQLRETURN rc = SQLFetch(hstmt);
Copy link
Collaborator

Choose a reason for hiding this comment

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

What I usually see that exceptions are not properly handled by test harness and you don't get much output with the failure message, limiting the usefulness of throwing exceptions explicitly in test code.
IMO (but this is highly opinionated) you may want to add extra info the assertion result with <<:
ASSERT_NE(SQL_ERROR, SQLFetch(hstmt)) << extract_diagnostics(hstmt, SQL_HANDLE_STMT);

@traceon traceon merged commit cb5d333 into ClickHouse:master Sep 18, 2020
@traceon traceon deleted the SQLGetData-zero-output-buffer-size-fix branch September 25, 2020 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't fetch strings over ClickHouse odbc driver
2 participants