Skip to content

Support EOF as statement separator in SQL scripts [SPR-11687] #16310

@spring-projects-issues

Description

@spring-projects-issues

Sam Brannen opened SPR-11687 and commented

Status Quo

Prior to Spring Framework 4.0.3, it was possible to supply a bogus statement separator (i.e., a separator string that does not exist in the configured SQL scripts) to ResourceDatabasePopulator with the effect that the entire contents of each script file would be interpreted as a single SQL statement. This undocumented feature was never intentional; however, some developers came to rely on it.

Changes made in conjunction with #14165 and #16184 cause such scenarios to no longer work. Thus, it would be beneficial to provide first-class support for treating the end of file (EOF) as a valid statement separator in SQL scripts that contain a single SQL statement spread across multiple lines without a trailing statement separator.


Deliverables

  1. Introduce explicit support for the EOF marker as a statement separator when executing SQL scripts.

Affects: 4.0.3

Issue Links:

Referenced from: commits 9230b38, 1753f5d, 03ae8ee, cc0ae3a

Metadata

Metadata

Assignees

Labels

in: dataIssues in data modules (jdbc, orm, oxm, tx)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions