Skip to content

Commit

Permalink
0002608: Changing initial load delete SQL can break the configuration
Browse files Browse the repository at this point in the history
export
  • Loading branch information
erilong committed May 23, 2016
1 parent 0f8f7e2 commit 60e7de9
Showing 1 changed file with 7 additions and 3 deletions.
Expand Up @@ -239,9 +239,13 @@ public String createPurgeSqlFor(Node node, TriggerRouter triggerRouter, TriggerH
StringBuilder statements = new StringBuilder(128);

for (String tableName : tableNames) {
statements.append(String.format(
parameterService.getString(ParameterConstants.INITIAL_LOAD_DELETE_FIRST_SQL),
tableName)).append(";");
String deleteSql = null;
if (tableName.startsWith(parameterService.getTablePrefix())) {
deleteSql = "delete from %s";
} else {
deleteSql = parameterService.getString(ParameterConstants.INITIAL_LOAD_DELETE_FIRST_SQL);
}
statements.append(String.format(deleteSql, tableName)).append(";");
}

statements.setLength(statements.length()-1); // Lose the last ;
Expand Down

0 comments on commit 60e7de9

Please sign in to comment.