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

Ignore delimiter enclosed in double quotes in ScriptUtils #26935

Closed
sbrannen opened this issue May 12, 2021 · 0 comments
Closed

Ignore delimiter enclosed in double quotes in ScriptUtils #26935

sbrannen opened this issue May 12, 2021 · 0 comments
Assignees
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) status: backported An issue that has been backported to maintenance branches type: bug A general bug
Milestone

Comments

@sbrannen
Copy link
Member

The containsSqlScriptDelimiters() method in ScriptUtils currently ignores delimiters enclosed in single quotes but not those enclosed within double quotes.

This contradicts the algorithm in splitSqlScript() and therefore constitutes a bug.

This applies to the ScriptUtils implementations in spring-jdbc and spring-r2dbc.

@sbrannen sbrannen added in: data Issues in data modules (jdbc, orm, oxm, tx) type: bug A general bug labels May 12, 2021
@sbrannen sbrannen added this to the 5.3.8 milestone May 12, 2021
@sbrannen sbrannen self-assigned this May 12, 2021
@spring-projects-issues spring-projects-issues added status: backported An issue that has been backported to maintenance branches and removed for: backport-to-5.2.x labels May 12, 2021
sbrannen added a commit that referenced this issue May 12, 2021
Prior to this commit, the containsSqlScriptDelimiters() method in
ScriptUtils ignored delimiters enclosed in single quotes but not those
enclosed within double quotes, which contradicts the algorithm in
splitSqlScript() and therefore constitutes a bug.

This commit fixes this bug in the ScriptUtils implementation in
spring-jdbc.

Closes gh-26935
lxbzmy pushed a commit to lxbzmy/spring-framework that referenced this issue Mar 26, 2022
Prior to this commit, the containsSqlScriptDelimiters() method in
ScriptUtils ignored delimiters enclosed in single quotes but not those
enclosed within double quotes, which contradicts the algorithm in
splitSqlScript() and therefore constitutes a bug.

This commit fixes this bug in the ScriptUtils implementations in
spring-jdbc and spring-r2dbc.

Closes spring-projectsgh-26935
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) status: backported An issue that has been backported to maintenance branches type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants