Skip to content

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 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.

@Override
public Map<String, String> defaultParameter() {
HashMap<String, String> map = new HashMap<>();
map.put("rewriteBatchedStatements", "true");
Copy link

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.
Copy link
Contributor

@davidzollo davidzollo left a comment

Choose a reason for hiding this comment

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

+1

@davidzollo davidzollo merged commit 79f8125 into apache:dev May 10, 2025
3 of 4 checks passed
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.

3 participants