Navigation Menu

Skip to content

Commit

Permalink
0002017: Log the DDL that installs functions required for SymmetricDS…
Browse files Browse the repository at this point in the history
… as it is being installed (similar to the way we log table DDL)
  • Loading branch information
chenson42 committed Oct 16, 2014
1 parent 2a25fba commit 6c4ad90
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Expand Up @@ -99,7 +99,7 @@ public void createRequiredDatabaseObjects() {
} else {
String function = this.parameterService.getTablePrefix() + "_" + TRANSACTION_ID + this.functionTemplateKeySuffix;
if (!installed(SQL_FUNCTION_INSTALLED, function)) {
String sql = "create function $(functionName)() " +
String sql = "create function $(functionName)() \n" +
" returns varchar(50) NOT DETERMINISTIC READS SQL DATA \n" +
" begin \n" +
" declare comm_value varchar(50); \n" +
Expand Down
Expand Up @@ -166,6 +166,7 @@ protected boolean installed(String sql, String objectName) {

protected void install(String sql, String objectName) {
sql = replaceTokens(sql, objectName);
log.info("Installing SymmetricDS database object:\n{}", sql);
platform.getSqlTemplate().update(sql);
log.info("Just installed {}", objectName);
}
Expand Down

0 comments on commit 6c4ad90

Please sign in to comment.