diff --git a/config/alfresco/messages/schema-update.properties b/config/alfresco/messages/schema-update.properties index 9bdd876e15..77b5b87b0a 100644 --- a/config/alfresco/messages/schema-update.properties +++ b/config/alfresco/messages/schema-update.properties @@ -28,4 +28,6 @@ schema.update.err.script_not_found=The schema script could not be found at locat schema.update.err.statement_include_before_sql=Script include ''--INCLUDE:'' must occur before starting the SQL statement (line {0} of {1}). schema.update.err.statement_var_assignment_before_sql=Variable assignment with ''--ASSIGN:'' must occur before starting the SQL statement (line {0} of {1}). schema.update.err.statement_var_assignment_format=Variable assignment uses format ''--ASSIGN:x=col'' where ''x'' is the variable to assign to and ''col'' is the column value to extract (line {0} of {1}). -schema.update.err.statement_terminator=Scripts must terminate all statements with '';'' (line {0} of {1}). +schema.update.err.statement_terminator=Scripts must terminate all statements with ''{0}'' (line {1} of {2}). +schema.update.err.delimiter_set_before_sql=Custom delimiter ''--SET-DELIMITER:'' must occur before starting the SQL statement (line {0} of {1}). +schema.update.err.delimiter_invalid=Custom delimiter ''--SET-DELIMITER:'' must set non-empty delimiter (line {0} of {1}). \ No newline at end of file diff --git a/config/alfresco/messages/schema-update_de.properties b/config/alfresco/messages/schema-update_de.properties index 5a320f915f..5bd490a366 100755 --- a/config/alfresco/messages/schema-update_de.properties +++ b/config/alfresco/messages/schema-update_de.properties @@ -28,4 +28,6 @@ schema.update.err.script_not_found=The schema script could not be found at locat schema.update.err.statement_include_before_sql=Script include ''--INCLUDE:'' must occur before starting the SQL statement (line {0} of {1}). schema.update.err.statement_var_assignment_before_sql=Variable assignment with ''--ASSIGN:'' must occur before starting the SQL statement (line {0} of {1}). schema.update.err.statement_var_assignment_format=Variable assignment uses format ''--ASSIGN:x=col'' where ''x'' is the variable to assign to and ''col'' is the column value to extract (line {0} of {1}). -schema.update.err.statement_terminator=Scripts must terminate all statements with '';'' (line {0} of {1}). +schema.update.err.statement_terminator=Scripts must terminate all statements with ''{0}'' (line {1} of {2}). +schema.update.err.delimiter_set_before_sql=Custom delimiter ''--SET-DELIMITER:'' must occur before starting the SQL statement (line {0} of {1}). +schema.update.err.delimiter_invalid=Custom delimiter ''--SET-DELIMITER:'' must set non-empty delimiter (line {0} of {1}). \ No newline at end of file diff --git a/config/alfresco/messages/schema-update_es.properties b/config/alfresco/messages/schema-update_es.properties index 5a320f915f..5bd490a366 100755 --- a/config/alfresco/messages/schema-update_es.properties +++ b/config/alfresco/messages/schema-update_es.properties @@ -28,4 +28,6 @@ schema.update.err.script_not_found=The schema script could not be found at locat schema.update.err.statement_include_before_sql=Script include ''--INCLUDE:'' must occur before starting the SQL statement (line {0} of {1}). schema.update.err.statement_var_assignment_before_sql=Variable assignment with ''--ASSIGN:'' must occur before starting the SQL statement (line {0} of {1}). schema.update.err.statement_var_assignment_format=Variable assignment uses format ''--ASSIGN:x=col'' where ''x'' is the variable to assign to and ''col'' is the column value to extract (line {0} of {1}). -schema.update.err.statement_terminator=Scripts must terminate all statements with '';'' (line {0} of {1}). +schema.update.err.statement_terminator=Scripts must terminate all statements with ''{0}'' (line {1} of {2}). +schema.update.err.delimiter_set_before_sql=Custom delimiter ''--SET-DELIMITER:'' must occur before starting the SQL statement (line {0} of {1}). +schema.update.err.delimiter_invalid=Custom delimiter ''--SET-DELIMITER:'' must set non-empty delimiter (line {0} of {1}). \ No newline at end of file diff --git a/config/alfresco/messages/schema-update_fr.properties b/config/alfresco/messages/schema-update_fr.properties index 5a320f915f..5bd490a366 100755 --- a/config/alfresco/messages/schema-update_fr.properties +++ b/config/alfresco/messages/schema-update_fr.properties @@ -28,4 +28,6 @@ schema.update.err.script_not_found=The schema script could not be found at locat schema.update.err.statement_include_before_sql=Script include ''--INCLUDE:'' must occur before starting the SQL statement (line {0} of {1}). schema.update.err.statement_var_assignment_before_sql=Variable assignment with ''--ASSIGN:'' must occur before starting the SQL statement (line {0} of {1}). schema.update.err.statement_var_assignment_format=Variable assignment uses format ''--ASSIGN:x=col'' where ''x'' is the variable to assign to and ''col'' is the column value to extract (line {0} of {1}). -schema.update.err.statement_terminator=Scripts must terminate all statements with '';'' (line {0} of {1}). +schema.update.err.statement_terminator=Scripts must terminate all statements with ''{0}'' (line {1} of {2}). +schema.update.err.delimiter_set_before_sql=Custom delimiter ''--SET-DELIMITER:'' must occur before starting the SQL statement (line {0} of {1}). +schema.update.err.delimiter_invalid=Custom delimiter ''--SET-DELIMITER:'' must set non-empty delimiter (line {0} of {1}). \ No newline at end of file diff --git a/config/alfresco/messages/schema-update_it.properties b/config/alfresco/messages/schema-update_it.properties index 5a320f915f..5bd490a366 100755 --- a/config/alfresco/messages/schema-update_it.properties +++ b/config/alfresco/messages/schema-update_it.properties @@ -28,4 +28,6 @@ schema.update.err.script_not_found=The schema script could not be found at locat schema.update.err.statement_include_before_sql=Script include ''--INCLUDE:'' must occur before starting the SQL statement (line {0} of {1}). schema.update.err.statement_var_assignment_before_sql=Variable assignment with ''--ASSIGN:'' must occur before starting the SQL statement (line {0} of {1}). schema.update.err.statement_var_assignment_format=Variable assignment uses format ''--ASSIGN:x=col'' where ''x'' is the variable to assign to and ''col'' is the column value to extract (line {0} of {1}). -schema.update.err.statement_terminator=Scripts must terminate all statements with '';'' (line {0} of {1}). +schema.update.err.statement_terminator=Scripts must terminate all statements with ''{0}'' (line {1} of {2}). +schema.update.err.delimiter_set_before_sql=Custom delimiter ''--SET-DELIMITER:'' must occur before starting the SQL statement (line {0} of {1}). +schema.update.err.delimiter_invalid=Custom delimiter ''--SET-DELIMITER:'' must set non-empty delimiter (line {0} of {1}). \ No newline at end of file diff --git a/config/alfresco/messages/schema-update_ja.properties b/config/alfresco/messages/schema-update_ja.properties index 5a320f915f..5bd490a366 100755 --- a/config/alfresco/messages/schema-update_ja.properties +++ b/config/alfresco/messages/schema-update_ja.properties @@ -28,4 +28,6 @@ schema.update.err.script_not_found=The schema script could not be found at locat schema.update.err.statement_include_before_sql=Script include ''--INCLUDE:'' must occur before starting the SQL statement (line {0} of {1}). schema.update.err.statement_var_assignment_before_sql=Variable assignment with ''--ASSIGN:'' must occur before starting the SQL statement (line {0} of {1}). schema.update.err.statement_var_assignment_format=Variable assignment uses format ''--ASSIGN:x=col'' where ''x'' is the variable to assign to and ''col'' is the column value to extract (line {0} of {1}). -schema.update.err.statement_terminator=Scripts must terminate all statements with '';'' (line {0} of {1}). +schema.update.err.statement_terminator=Scripts must terminate all statements with ''{0}'' (line {1} of {2}). +schema.update.err.delimiter_set_before_sql=Custom delimiter ''--SET-DELIMITER:'' must occur before starting the SQL statement (line {0} of {1}). +schema.update.err.delimiter_invalid=Custom delimiter ''--SET-DELIMITER:'' must set non-empty delimiter (line {0} of {1}). \ No newline at end of file diff --git a/config/alfresco/messages/schema-update_nb.properties b/config/alfresco/messages/schema-update_nb.properties index 5a320f915f..5bd490a366 100755 --- a/config/alfresco/messages/schema-update_nb.properties +++ b/config/alfresco/messages/schema-update_nb.properties @@ -28,4 +28,6 @@ schema.update.err.script_not_found=The schema script could not be found at locat schema.update.err.statement_include_before_sql=Script include ''--INCLUDE:'' must occur before starting the SQL statement (line {0} of {1}). schema.update.err.statement_var_assignment_before_sql=Variable assignment with ''--ASSIGN:'' must occur before starting the SQL statement (line {0} of {1}). schema.update.err.statement_var_assignment_format=Variable assignment uses format ''--ASSIGN:x=col'' where ''x'' is the variable to assign to and ''col'' is the column value to extract (line {0} of {1}). -schema.update.err.statement_terminator=Scripts must terminate all statements with '';'' (line {0} of {1}). +schema.update.err.statement_terminator=Scripts must terminate all statements with ''{0}'' (line {1} of {2}). +schema.update.err.delimiter_set_before_sql=Custom delimiter ''--SET-DELIMITER:'' must occur before starting the SQL statement (line {0} of {1}). +schema.update.err.delimiter_invalid=Custom delimiter ''--SET-DELIMITER:'' must set non-empty delimiter (line {0} of {1}). \ No newline at end of file diff --git a/config/alfresco/messages/schema-update_nl.properties b/config/alfresco/messages/schema-update_nl.properties index 5a320f915f..5bd490a366 100755 --- a/config/alfresco/messages/schema-update_nl.properties +++ b/config/alfresco/messages/schema-update_nl.properties @@ -28,4 +28,6 @@ schema.update.err.script_not_found=The schema script could not be found at locat schema.update.err.statement_include_before_sql=Script include ''--INCLUDE:'' must occur before starting the SQL statement (line {0} of {1}). schema.update.err.statement_var_assignment_before_sql=Variable assignment with ''--ASSIGN:'' must occur before starting the SQL statement (line {0} of {1}). schema.update.err.statement_var_assignment_format=Variable assignment uses format ''--ASSIGN:x=col'' where ''x'' is the variable to assign to and ''col'' is the column value to extract (line {0} of {1}). -schema.update.err.statement_terminator=Scripts must terminate all statements with '';'' (line {0} of {1}). +schema.update.err.statement_terminator=Scripts must terminate all statements with ''{0}'' (line {1} of {2}). +schema.update.err.delimiter_set_before_sql=Custom delimiter ''--SET-DELIMITER:'' must occur before starting the SQL statement (line {0} of {1}). +schema.update.err.delimiter_invalid=Custom delimiter ''--SET-DELIMITER:'' must set non-empty delimiter (line {0} of {1}). \ No newline at end of file diff --git a/config/alfresco/messages/schema-update_ru.properties b/config/alfresco/messages/schema-update_ru.properties index 5a320f915f..5bd490a366 100755 --- a/config/alfresco/messages/schema-update_ru.properties +++ b/config/alfresco/messages/schema-update_ru.properties @@ -28,4 +28,6 @@ schema.update.err.script_not_found=The schema script could not be found at locat schema.update.err.statement_include_before_sql=Script include ''--INCLUDE:'' must occur before starting the SQL statement (line {0} of {1}). schema.update.err.statement_var_assignment_before_sql=Variable assignment with ''--ASSIGN:'' must occur before starting the SQL statement (line {0} of {1}). schema.update.err.statement_var_assignment_format=Variable assignment uses format ''--ASSIGN:x=col'' where ''x'' is the variable to assign to and ''col'' is the column value to extract (line {0} of {1}). -schema.update.err.statement_terminator=Scripts must terminate all statements with '';'' (line {0} of {1}). +schema.update.err.statement_terminator=Scripts must terminate all statements with ''{0}'' (line {1} of {2}). +schema.update.err.delimiter_set_before_sql=Custom delimiter ''--SET-DELIMITER:'' must occur before starting the SQL statement (line {0} of {1}). +schema.update.err.delimiter_invalid=Custom delimiter ''--SET-DELIMITER:'' must set non-empty delimiter (line {0} of {1}). \ No newline at end of file diff --git a/config/alfresco/messages/schema-update_zh_CN.properties b/config/alfresco/messages/schema-update_zh_CN.properties index 5a320f915f..5bd490a366 100755 --- a/config/alfresco/messages/schema-update_zh_CN.properties +++ b/config/alfresco/messages/schema-update_zh_CN.properties @@ -28,4 +28,6 @@ schema.update.err.script_not_found=The schema script could not be found at locat schema.update.err.statement_include_before_sql=Script include ''--INCLUDE:'' must occur before starting the SQL statement (line {0} of {1}). schema.update.err.statement_var_assignment_before_sql=Variable assignment with ''--ASSIGN:'' must occur before starting the SQL statement (line {0} of {1}). schema.update.err.statement_var_assignment_format=Variable assignment uses format ''--ASSIGN:x=col'' where ''x'' is the variable to assign to and ''col'' is the column value to extract (line {0} of {1}). -schema.update.err.statement_terminator=Scripts must terminate all statements with '';'' (line {0} of {1}). +schema.update.err.statement_terminator=Scripts must terminate all statements with ''{0}'' (line {1} of {2}). +schema.update.err.delimiter_set_before_sql=Custom delimiter ''--SET-DELIMITER:'' must occur before starting the SQL statement (line {0} of {1}). +schema.update.err.delimiter_invalid=Custom delimiter ''--SET-DELIMITER:'' must set non-empty delimiter (line {0} of {1}). \ No newline at end of file diff --git a/source/java/org/alfresco/repo/domain/schema/SchemaBootstrap.java b/source/java/org/alfresco/repo/domain/schema/SchemaBootstrap.java index e60b44f41a..8905f36450 100644 --- a/source/java/org/alfresco/repo/domain/schema/SchemaBootstrap.java +++ b/source/java/org/alfresco/repo/domain/schema/SchemaBootstrap.java @@ -160,6 +160,8 @@ public class SchemaBootstrap extends AbstractLifecycleBean private static final String ERR_STATEMENT_VAR_ASSIGNMENT_BEFORE_SQL = "schema.update.err.statement_var_assignment_before_sql"; private static final String ERR_STATEMENT_VAR_ASSIGNMENT_FORMAT = "schema.update.err.statement_var_assignment_format"; private static final String ERR_STATEMENT_TERMINATOR = "schema.update.err.statement_terminator"; + private static final String ERR_DELIMITER_SET_BEFORE_SQL = "schema.update.err.delimiter_set_before_sql"; + private static final String ERR_DELIMITER_INVALID = "schema.update.err.delimiter_invalid"; private static final String DEBUG_SCHEMA_COMP_NO_REF_FILE = "system.schema_comp.debug.no_ref_file"; private static final String INFO_SCHEMA_COMP_ALL_OK = "system.schema_comp.info.all_ok"; private static final String WARN_SCHEMA_COMP_PROBLEMS_FOUND = "system.schema_comp.warn.problems_found"; @@ -1257,6 +1259,7 @@ public class SchemaBootstrap extends AbstractLifecycleBean int batchUpperLimit = 0; int batchSize = 1; Map varAssignments = new HashMap(13); + String delimiter = ";"; // Special variable assignments: if (dialect instanceof PostgreSQLDialect) { @@ -1360,6 +1363,22 @@ public class SchemaBootstrap extends AbstractLifecycleBean connection.setAutoCommit(true); continue; } + else if (sql.startsWith("--SET-DELIMITER:")) + { + if (sb.length() > 0) + { + // This can only be set before a new SQL statement + throw AlfrescoRuntimeException.create(ERR_DELIMITER_SET_BEFORE_SQL, (line - 1), scriptUrl); + } + + // We're good...so set the new delimiter + String newDelim = sql.substring(16).trim(); + if (newDelim.length() == 0) + { + throw AlfrescoRuntimeException.create(ERR_DELIMITER_INVALID, (line - 1), scriptUrl); + } + delimiter = newDelim; + } // Check for comments if (sql.length() == 0 || @@ -1370,7 +1389,7 @@ public class SchemaBootstrap extends AbstractLifecycleBean if (sb.length() > 0) { // we have an unterminated statement - throw AlfrescoRuntimeException.create(ERR_STATEMENT_TERMINATOR, (line - 1), scriptUrl); + throw AlfrescoRuntimeException.create(ERR_STATEMENT_TERMINATOR, delimiter, (line - 1), scriptUrl); } // there has not been anything to execute - it's just a comment line continue; @@ -1378,7 +1397,7 @@ public class SchemaBootstrap extends AbstractLifecycleBean // have we reached the end of a statement? boolean execute = false; boolean optional = false; - if (sql.endsWith(";")) + if (sql.endsWith(delimiter)) { sql = sql.substring(0, sql.length() - 1); execute = true; @@ -1387,7 +1406,7 @@ public class SchemaBootstrap extends AbstractLifecycleBean else if (sql.endsWith("(optional)") || sql.endsWith("(OPTIONAL)")) { // Get the end of statement - int endIndex = sql.lastIndexOf(';'); + int endIndex = sql.lastIndexOf(delimiter); if (endIndex > -1) { sql = sql.substring(0, endIndex); diff --git a/source/java/org/alfresco/repo/domain/schema/script/ScriptExecutorImpl.java b/source/java/org/alfresco/repo/domain/schema/script/ScriptExecutorImpl.java index 51fdc49b62..585af1f058 100644 --- a/source/java/org/alfresco/repo/domain/schema/script/ScriptExecutorImpl.java +++ b/source/java/org/alfresco/repo/domain/schema/script/ScriptExecutorImpl.java @@ -66,6 +66,8 @@ public class ScriptExecutorImpl implements ScriptExecutor private static final String ERR_STATEMENT_VAR_ASSIGNMENT_BEFORE_SQL = "schema.update.err.statement_var_assignment_before_sql"; private static final String ERR_STATEMENT_VAR_ASSIGNMENT_FORMAT = "schema.update.err.statement_var_assignment_format"; private static final String ERR_STATEMENT_TERMINATOR = "schema.update.err.statement_terminator"; + private static final String ERR_DELIMITER_SET_BEFORE_SQL = "schema.update.err.delimiter_set_before_sql"; + private static final String ERR_DELIMITER_INVALID = "schema.update.err.delimiter_invalid"; private static final int DEFAULT_MAX_STRING_LENGTH = 1024; private static volatile int maxStringLength = DEFAULT_MAX_STRING_LENGTH; private Dialect dialect; @@ -313,6 +315,7 @@ public class ScriptExecutorImpl implements ScriptExecutor int batchUpperLimit = 0; int batchSize = 1; Map varAssignments = new HashMap(13); + String delimiter = ";"; // Special variable assignments: if (dialect instanceof PostgreSQLDialect) { @@ -417,6 +420,22 @@ public class ScriptExecutorImpl implements ScriptExecutor connection.setAutoCommit(true); continue; } + else if (sql.startsWith("--SET-DELIMITER:")) + { + if (sb.length() > 0) + { + // This can only be set before a new SQL statement + throw AlfrescoRuntimeException.create(ERR_DELIMITER_SET_BEFORE_SQL, (line - 1), scriptUrl); + } + + // We're good...so set the new delimiter + String newDelim = sql.substring(16).trim(); + if (newDelim.length() == 0) + { + throw AlfrescoRuntimeException.create(ERR_DELIMITER_INVALID, (line - 1), scriptUrl); + } + delimiter = newDelim; + } // Check for comments if (sql.length() == 0 || @@ -427,7 +446,7 @@ public class ScriptExecutorImpl implements ScriptExecutor if (sb.length() > 0) { // we have an unterminated statement - throw AlfrescoRuntimeException.create(ERR_STATEMENT_TERMINATOR, (line - 1), scriptUrl); + throw AlfrescoRuntimeException.create(ERR_STATEMENT_TERMINATOR, delimiter, (line - 1), scriptUrl); } // there has not been anything to execute - it's just a comment line continue; @@ -435,7 +454,7 @@ public class ScriptExecutorImpl implements ScriptExecutor // have we reached the end of a statement? boolean execute = false; boolean optional = false; - if (sql.endsWith(";")) + if (sql.endsWith(delimiter)) { sql = sql.substring(0, sql.length() - 1); execute = true; @@ -444,7 +463,7 @@ public class ScriptExecutorImpl implements ScriptExecutor else if (sql.endsWith("(optional)") || sql.endsWith("(OPTIONAL)")) { // Get the end of statement - int endIndex = sql.lastIndexOf(';'); + int endIndex = sql.lastIndexOf(delimiter); if (endIndex > -1) { sql = sql.substring(0, endIndex); diff --git a/source/test-java/org/alfresco/repo/domain/schema/script/ScriptExecutorImplIntegrationTest.java b/source/test-java/org/alfresco/repo/domain/schema/script/ScriptExecutorImplIntegrationTest.java index 25cb1b28d3..21f4423897 100644 --- a/source/test-java/org/alfresco/repo/domain/schema/script/ScriptExecutorImplIntegrationTest.java +++ b/source/test-java/org/alfresco/repo/domain/schema/script/ScriptExecutorImplIntegrationTest.java @@ -1,6 +1,7 @@ package org.alfresco.repo.domain.schema.script; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.fail; import java.util.List; @@ -155,4 +156,58 @@ public class ScriptExecutorImplIntegrationTest assertEquals("schema.update.err.script_not_found", e.getMsgId()); } } + + @Test() + public void emptyCustomDelimiter() throws Exception + { + try + { + scriptExecutor.executeScriptUrl("scriptexec/${db.script.dialect}/empty-delimiter.sql"); + fail("Script execution should fail."); + } + catch (AlfrescoRuntimeException e) + { + assertEquals("schema.update.err.delimiter_invalid", e.getMsgId()); + } + } + + @Test() + public void wrongUsageCustomDelimiter() throws Exception + { + try + { + scriptExecutor.executeScriptUrl("scriptexec/${db.script.dialect}/wrong-usage-delimiter.sql"); + fail("Script execution should fail."); + } + catch (AlfrescoRuntimeException e) + { + assertEquals("schema.update.err.delimiter_set_before_sql", e.getMsgId()); + } + } + + @Test() + public void unterminatedCustomDelimiter() throws Exception + { + try + { + scriptExecutor.executeScriptUrl("scriptexec/${db.script.dialect}/unterminated-custom-delimiter.sql"); + fail("Script execution should fail."); + } + catch (AlfrescoRuntimeException e) + { + assertEquals("schema.update.err.statement_terminator", e.getMsgId()); + } + } + + @Test() + public void customDelimiter() throws Exception + { + scriptExecutor.executeScriptUrl("scriptexec/${db.script.dialect}/custom-delimiter.sql"); + String select = "select message from alf_test_custom_delimiter"; + List res = jdbcTmpl.queryForList(select, String.class); + assertEquals(2, res.size()); + assertEquals("custom delimter success", res.get(0)); + assertEquals("custom delimter success again", res.get(1)); + + } } diff --git a/source/test-resources/scriptexec/org.hibernate.dialect.Dialect/custom-delimiter.sql b/source/test-resources/scriptexec/org.hibernate.dialect.Dialect/custom-delimiter.sql new file mode 100644 index 0000000000..c9c2c61d58 --- /dev/null +++ b/source/test-resources/scriptexec/org.hibernate.dialect.Dialect/custom-delimiter.sql @@ -0,0 +1,12 @@ +--SET-DELIMITER: / +drop table alf_test_custom_delimiter/ --(optional) + +create table alf_test_custom_delimiter +( + message VARCHAR(255) +)/ + +insert into alf_test_custom_delimiter (message) values ('custom delimter success')/ + +--SET-DELIMITER: ; +insert into alf_test_custom_delimiter (message) values ('custom delimter success again'); diff --git a/source/test-resources/scriptexec/org.hibernate.dialect.Dialect/empty-delimiter.sql b/source/test-resources/scriptexec/org.hibernate.dialect.Dialect/empty-delimiter.sql new file mode 100644 index 0000000000..29183829a5 --- /dev/null +++ b/source/test-resources/scriptexec/org.hibernate.dialect.Dialect/empty-delimiter.sql @@ -0,0 +1 @@ +--SET-DELIMITER: diff --git a/source/test-resources/scriptexec/org.hibernate.dialect.Dialect/unterminated-custom-delimiter.sql b/source/test-resources/scriptexec/org.hibernate.dialect.Dialect/unterminated-custom-delimiter.sql new file mode 100644 index 0000000000..cf396c17d3 --- /dev/null +++ b/source/test-resources/scriptexec/org.hibernate.dialect.Dialect/unterminated-custom-delimiter.sql @@ -0,0 +1,3 @@ +--SET-DELIMITER: / +select 1; + diff --git a/source/test-resources/scriptexec/org.hibernate.dialect.Dialect/wrong-usage-delimiter.sql b/source/test-resources/scriptexec/org.hibernate.dialect.Dialect/wrong-usage-delimiter.sql new file mode 100644 index 0000000000..7ade637679 --- /dev/null +++ b/source/test-resources/scriptexec/org.hibernate.dialect.Dialect/wrong-usage-delimiter.sql @@ -0,0 +1,3 @@ +select 1 +--SET-DELIMITER: / +; \ No newline at end of file