Skip to content

[Fix][Connector-V2] Fix oceanbase mysql jdbc sink create statement error #9267

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

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

Hisoka-X
Copy link
Member

@Hisoka-X Hisoka-X commented May 6, 2025

Purpose of this pull request

Fix oceanbase mysql jdbc sink create statement error.
refer https://ask.oceanbase.com/t/topic/35602897.

Does this PR introduce any user-facing change?

no

How was this patch tested?

exist

Check list

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes the oceanbase mysql jdbc sink create statement error by adding the missing JDBC parameter.

  • Added "allowMultiQueries" parameter set to "true" to support multi-statement queries in the OceanBase MySQL dialect.

@@ -137,6 +137,7 @@ public String extractTableName(TablePath tablePath) {
public Map<String, String> defaultParameter() {
HashMap<String, String> map = new HashMap<>();
map.put("rewriteBatchedStatements", "true");
Copy link
Preview

Copilot AI May 6, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider adding a comment explaining why the "allowMultiQueries" parameter is necessary for clarity and future maintainability.

Suggested change
map.put("rewriteBatchedStatements", "true");
map.put("rewriteBatchedStatements", "true");
// Enable multiple SQL queries in a single statement. This is required for certain
// OceanBase MySQL operations that rely on executing multiple queries together.
// Note: Use with caution as it may increase the risk of SQL injection if inputs are not sanitized.

Copilot uses AI. Check for mistakes.

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