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

[jdbc-v2] Fixed closing prev result set #2041

Merged
merged 1 commit into from
Dec 19, 2024
Merged

Conversation

chernser
Copy link
Contributor

Summary

Fixes closing prev. result set in execureQuery method of StatementImpl.
Also fixed passing SET queries to server and not just handling roles staff.

Checklist

Delete items not relevant to your PR:

  • Closes issue
  • Unit and integration tests covering the common scenarios were added
  • A human-readable description of the changes was provided to include in CHANGELOG
  • For significant changes, documentation in https://github.com/ClickHouse/clickhouse-docs was updated with further explanations or tutorials

@chernser chernser requested a review from Paultagoras December 19, 2024 18:24
@Paultagoras Paultagoras merged commit 0760386 into main Dec 19, 2024
2 checks passed
@Paultagoras Paultagoras deleted the jdbc2_fix_connections branch December 19, 2024 18:27
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
22.2% Coverage on New Code (required ≥ 80%)
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@@ -289,6 +301,7 @@ private boolean execute(String sql, QuerySettings settings) throws SQLException
executeQuery(sql, settings); // keep open to allow getResultSet()
return true;
} else if(type == StatementType.SET) {
executeUpdate(sql, settings);
Copy link

Choose a reason for hiding this comment

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

@chernser
I don't think that we need to execute this update; the role URL setting is enough, as the HTTP interface is stateless.

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.

4 participants