Skip to content

Commit

Permalink
0003659: SqlAnywhere dialect crashes when DB name has special char (#102
Browse files Browse the repository at this point in the history
)

(cherry picked from commit 3ff364e)
  • Loading branch information
matthoward authored and jaredfrees committed May 28, 2019
1 parent 9e5a266 commit e97e810
Showing 1 changed file with 7 additions and 2 deletions.
Expand Up @@ -39,6 +39,7 @@
import org.jumpmind.symmetric.db.ISymmetricDialect;
import org.jumpmind.symmetric.model.Trigger;
import org.jumpmind.symmetric.service.IParameterService;
import org.jumpmind.symmetric.util.SymmetricUtils;

/*
* Sybase dialect was tested with jconn4 JDBC driver.
Expand Down Expand Up @@ -247,12 +248,16 @@ public void enableSyncTriggers(ISqlTransaction transaction) {
}

public String getSyncTriggersExpression() {
return "$(defaultCatalog)$(defaultSchema)"+parameterService.getTablePrefix()+"_triggers_disabled(0) = 0";
return SymmetricUtils.quote(this, platform.getDefaultCatalog()) +
".$(defaultSchema)"+
parameterService.getTablePrefix()+"_triggers_disabled(0) = 0";
}

@Override
public String getTransactionTriggerExpression(String defaultCatalog, String defaultSchema, Trigger trigger) {
return platform.getDefaultCatalog() + ".$(defaultSchema)"+parameterService.getTablePrefix()+"_txid(0)";
return SymmetricUtils.quote(this, platform.getDefaultCatalog()) +
".$(defaultSchema)"+
parameterService.getTablePrefix()+"_txid(0)";
}

@Override
Expand Down

0 comments on commit e97e810

Please sign in to comment.