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

[PLUGIN-1017] Escape column names #18

Merged
merged 3 commits into from
Dec 5, 2024

Conversation

psainics
Copy link
Collaborator

@psainics psainics commented Oct 7, 2024

Escape column names

Jira : PLUGIN-1017

Description

If column name is a MySQL reserved keyword say insert the query will fail due to incorrect sql syntax.
This PR fixes this issue by escaping the column names using back ticks.

Similar column escapes is used in other plugins. Ref CloudSQLPostgreSQLSink

Code change

  • Modified CloudSQLMySQLSink.java

Unit Tests

  • Added CloudSQLMySQLSinkTest.java

image

@psainics psainics added bug Something isn't working enhancement New feature or request labels Oct 7, 2024
@psainics psainics self-assigned this Oct 7, 2024
@psainics psainics force-pushed the pathc/escape-column-names-cloud-mysql branch 2 times, most recently from fa1425c to 58d2d12 Compare October 7, 2024 07:36
Added fix for date datatype
@psainics psainics force-pushed the pathc/escape-column-names-cloud-mysql branch from 58d2d12 to 307d311 Compare October 22, 2024 05:07
…ssue-dev

[PLUGIN-1812] Added fix for date datatype in oracle sink
@psainics psainics force-pushed the pathc/escape-column-names-cloud-mysql branch from 307d311 to b8a9f71 Compare October 23, 2024 05:58
@psainics psainics force-pushed the pathc/escape-column-names-cloud-mysql branch from b8a9f71 to 7be2c44 Compare October 23, 2024 09:30
@vikasrathee-cs vikasrathee-cs merged commit 81c8853 into develop Dec 5, 2024
2 checks passed
@psainics psainics deleted the pathc/escape-column-names-cloud-mysql branch December 5, 2024 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants