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

Improve comment handling in ResourceDatabasePopulator [SPR-9261] #13899

spring-projects-issues opened this issue Mar 22, 2012 · 1 comment
in: core status: duplicate type: enhancement


Copy link

spring-projects-issues commented Mar 22, 2012

Lukas Kuster opened SPR-9261 and commented

The ResourceDatabasePopulator currently strips comments from an SQL file, but only if they start at the beginning of the line. If they are indented, or if they are placed on the same line after an SQL statement, they are left in the script and can be wrapped in with the following SQL statement, depending on the statement separator used.
E.g. in the following script, the comments at lines 2 and 3 would both be wrapped in with the insert statement on line 4, causing it to not be executed properly.

-- leading comment
insert into T_TEST (NAME) values ('Keith'); -- comment at EOL
	-- indented comment
insert into T_TEST (NAME) values ('Dave');

With the attached patch the ResourceDatabasePopulator removes all comments from an SQL file. A unit test illustrating the behaviour is included.

Affects: 3.1.1


Issue Links:

Copy link
Collaborator Author

spring-projects-issues commented Sep 22, 2015

Sam Brannen commented

This issue has been superseded by #14227, #14616, and #14964.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
in: core status: duplicate type: enhancement
None yet

No branches or pull requests

2 participants