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

NamedParameterUtils.parseSqlStatement should parse :{x} style parameter correctly [SPR-16663] #21204

Closed
spring-projects-issues opened this issue Mar 29, 2018 · 2 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

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Mar 29, 2018

Zhang Jie opened SPR-16663 and commented

In my opinion, we should parse :{x} style parameter as x is parameter using NamedParameterUtils.parseSqlStatement,
so the condition j - i > 2 is the correct condition, not j - i > 3, because if i is the index of : in :{x}, and j is the index of } in :{x},
j - i == 3 is true.


Affects: 4.3.14, 5.0.4

Issue Links:

Referenced from: pull request #1758, and commits 82cb5db, f3dd22d

Backported to: 4.3.15

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

Good catch! Merged for 5.0.5 now; I'll backport it to 4.3.15 later today.

@spring-projects-issues
Copy link
Collaborator Author

Zhang Jie commented

Thanks for responsing so quickly, I have added some text formating in description.
PS: If I could preview the description, I will not have edited the description so much times.

@spring-projects-issues spring-projects-issues added type: bug A general bug in: data Issues in data modules (jdbc, orm, oxm, tx) status: backported An issue that has been backported to maintenance branches labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 5.0.5 milestone Jan 11, 2019
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