Skip to content

Commit

Permalink
0005273: Rebuild trigger does not take into account the target platform
Browse files Browse the repository at this point in the history
  • Loading branch information
Philip Marzullo committed Apr 19, 2022
1 parent cc34018 commit 3345b2f
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -1569,9 +1569,10 @@ public boolean syncTriggers(List<Table> tables, boolean force) {
activeTriggerHistories, true);
for (Table table : tables) {
/* Re-lookup just in case the table was just altered */
table = symmetricDialect.getTargetPlatform(table.getName()).getTableFromCache(table.getCatalog(), table.getSchema(), table.getName(), true);
IDatabasePlatform targetPlatform = symmetricDialect.getTargetPlatform(table.getName());
table = targetPlatform.getTableFromCache(table.getCatalog(), table.getSchema(), table.getName(), true);
for (Trigger trigger : triggersForCurrentNode) {
if (trigger.matches(table, platform.getDefaultCatalog(), platform.getDefaultSchema(), ignoreCase) &&
if (trigger.matches(table, targetPlatform.getDefaultCatalog(), targetPlatform.getDefaultSchema(), ignoreCase) &&
(!trigger.isSourceTableNameWildCarded() || !trigger.isSourceTableNameExpanded()
|| !containsExactMatchForSourceTableName(table, triggersForCurrentNode, ignoreCase))) {
List<TriggerTableSupportingInfo> triggerTableSupportingInfoList = triggerToTableSupportingInfo.get(trigger.getTriggerId());
Expand Down

0 comments on commit 3345b2f

Please sign in to comment.