- 
                Notifications
    You must be signed in to change notification settings 
- Fork 38.8k
Closed
Labels
in: dataIssues in data modules (jdbc, orm, oxm, tx)Issues in data modules (jdbc, orm, oxm, tx)type: bugA general bugA general bug
Milestone
Description
Gary Russell opened SPR-11560 and commented
Attempting to execute the following SQL script using a ResourceDatabasePopulator...
CREATE ALIAS IF NOT EXISTS GET_PRIME_NUMBERS FOR "org.springframework.integration.jdbc.storedproc.h2.H2StoredProcedures.getPrimes"
CREATE ALIAS IF NOT EXISTS GET_RANDOM_NUMBER FOR "org.springframework.integration.jdbc.storedproc.h2.H2StoredProcedures.random"... now results in the following exception:
Caused by: org.h2.jdbc.JdbcSQLException: Syntax error in SQL statement "CREATE ALIAS IF NOT EXISTS GET_PRIME_NUMBERS FOR ""org.springframework.integration.jdbc.storedproc.h2.H2StoredProcedures.getPrimes"" CREATE[*] ALIAS IF NOT EXISTS GET_RANDOM_NUMBER FOR ""org.springframework.integration.jdbc.storedproc.h2.H2StoredProcedures.random"""; SQL statement:
CREATE ALIAS IF NOT EXISTS GET_PRIME_NUMBERS FOR "org.springframework.integration.jdbc.storedproc.h2.H2StoredProcedures.getPrimes" CREATE ALIAS IF NOT EXISTS GET_RANDOM_NUMBER FOR "org.springframework.integration.jdbc.storedproc.h2.H2StoredProcedures.random" [42000-175]
Using ; as the statement separator in the script file resolves this particular case.
This appears to have been caused by the fix to #14165
Affects: 4.0.3
Issue Links:
- Support EOF as statement separator in SQL scripts [SPR-11687] #16310 Support EOF as statement separator in SQL scripts ("is depended on by")
- H2 aliases are not supported in SQL ScriptUtils [SPR-15896] #20450 H2 aliases are not supported in SQL ScriptUtils
- Support multi-line SQL comments in ResourceDatabasePopulator and JdbcTestUtils [SPR-9531] #14165 Support multi-line SQL comments in ResourceDatabasePopulator and JdbcTestUtils
Metadata
Metadata
Assignees
Labels
in: dataIssues in data modules (jdbc, orm, oxm, tx)Issues in data modules (jdbc, orm, oxm, tx)type: bugA general bugA general bug