Skip to content

Commit

Permalink
Added node.sync_enabled check to the triggers.
Browse files Browse the repository at this point in the history
  • Loading branch information
chenson42 committed Oct 4, 2007
1 parent 0983698 commit 11ae4e4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
Expand Up @@ -72,6 +72,7 @@ public void extractClientIdentityFor(Node node, IOutgoingTransport transport) {

public void extractInitialLoadFor(Node client, final Trigger trigger,
final IOutgoingTransport transport) {

final String sql = dbDialect.createInitalLoadSqlFor(client, trigger);
final OutgoingBatch batch = new OutgoingBatch(client, trigger
.getChannelId(), BatchType.INITIAL_LOAD);
Expand Down
12 changes: 6 additions & 6 deletions symmetric/src/main/resources/symmetric-dialects.xml
Expand Up @@ -54,7 +54,7 @@
CURRENT_TIMESTAMP
);
insert into $(defaultSchema)$(prefixName)_data_event (node_id, data_id) (select node_id, last_insert_id() from $(defaultSchema)$(prefixName)_node c where
c.node_group_id='$(targetGroupId)' $(nodeSelectWhere));
c.node_group_id='$(targetGroupId)' and c.sync_enabled=1 $(nodeSelectWhere));
end if;
end
]]>
Expand All @@ -80,7 +80,7 @@
CURRENT_TIMESTAMP
);
insert into $(defaultSchema)$(prefixName)_data_event (node_id, data_id) (select node_id, last_insert_id() from $(defaultSchema)$(prefixName)_node c where
c.node_group_id='$(targetGroupId)' $(nodeSelectWhere));
c.node_group_id='$(targetGroupId)' and c.sync_enabled=1 $(nodeSelectWhere));
end if;
end
]]>
Expand All @@ -104,7 +104,7 @@
CURRENT_TIMESTAMP
);
insert into $(defaultSchema)$(prefixName)_data_event (node_id, data_id) (select node_id, last_insert_id() from $(defaultSchema)$(prefixName)_node c where
c.node_group_id='$(targetGroupId)' $(nodeSelectWhere));
c.node_group_id='$(targetGroupId)' and c.sync_enabled=1 $(nodeSelectWhere));
end if;
end
]]>
Expand Down Expand Up @@ -171,7 +171,7 @@
CURRENT_TIMESTAMP
);
insert into $(defaultSchema)$(prefixName)_data_event (node_id, data_id) (select node_id, $(defaultSchema)SEQ_$(prefixName)_data_data_id.CURRVAL from $(prefixName)_node c where
c.node_group_id='$(targetGroupId)' $(nodeSelectWhere));
c.node_group_id='$(targetGroupId)' and c.sync_enabled=1 $(nodeSelectWhere));
end if;
end;
]]>
Expand All @@ -195,7 +195,7 @@
CURRENT_TIMESTAMP
);
insert into $(defaultSchema)$(prefixName)_data_event (node_id, data_id) (select node_id, $(defaultSchema)SEQ_$(prefixName)_data_data_id.CURRVAL from $(prefixName)_node c where
c.node_group_id='$(targetGroupId)' $(nodeSelectWhere));
c.node_group_id='$(targetGroupId)' and c.sync_enabled=1 $(nodeSelectWhere));
end if;
end;
]]>
Expand All @@ -218,7 +218,7 @@
CURRENT_TIMESTAMP
);
insert into $(defaultSchema)$(prefixName)_data_event (node_id, data_id) (select node_id, $(defaultSchema)SEQ_$(prefixName)_data_data_id.CURRVAL from $(prefixName)_node c where
c.node_group_id='$(targetGroupId)' $(nodeSelectWhere));
c.node_group_id='$(targetGroupId)' and c.sync_enabled=1 $(nodeSelectWhere));
end if;
end;
]]>
Expand Down
1 change: 1 addition & 0 deletions symmetric/src/main/resources/symmetric-services.xml
Expand Up @@ -55,6 +55,7 @@
<value>${sync.table.prefix}_node_group_link</value>
<value>${sync.table.prefix}_node</value>
<value>${sync.table.prefix}_node_security</value>
<value>${sync.table.prefix}_node_channel_ctl</value>
<value>${sync.table.prefix}_global_parameter</value>
<value>${sync.table.prefix}_channel</value>
<value>${sync.table.prefix}_trigger</value>
Expand Down

0 comments on commit 11ae4e4

Please sign in to comment.