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

Make trailing semicolons in scripts configurable #2559

Merged
merged 1 commit into from
Dec 14, 2023

Conversation

hgschmie
Copy link
Contributor

Turns out that MySQL and Oracle simply have differing ideas on what a
statement in a script should be. Oracle needs the trailing semicolons,
MySQL throws syntax errors (when using the
rewriteBatchedStatements=true setting, otherwise it reports a much
saner "cannot issue select statements with update" type of error
message.

Added a switch that retains the default behavior but can be flipped
to allow the error case described in #2554 to work.

Reported by @IrinaTerlizhenko, thank you for this!

Turns out that MySQL and Oracle simply have differing ideas on what a
statement in a script should be. Oracle needs the trailing semicolons,
MySQL throws syntax errors (when using the
rewriteBatchedStatements=true setting, otherwise it reports a much
saner "cannot issue select statements with update" type of error
message.

Added a switch that retains the default behavior but can be flipped
to allow the error case described in jdbi#2554 to work.

Reported by @IrinaTerlizhenko, thank you for this!
Copy link

sonarcloud bot commented Dec 11, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@hgschmie hgschmie merged commit b9a3940 into jdbi:master Dec 14, 2023
44 checks passed
@hgschmie hgschmie deleted the trailing-semicolon-switch branch December 14, 2023 04:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants