Skip to content

Commit

Permalink
0002535: Some SQL has sym_ hardcoded in table name
Browse files Browse the repository at this point in the history
  • Loading branch information
erilong committed Mar 24, 2016
1 parent 27fae74 commit b2157ec
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -93,7 +93,7 @@ public MsSqlTriggerTemplate(ISymmetricDialect symmetricDialect) {
" fetch next from DataCursor into @DataRow $(newKeyVariables), @ChannelId \n" +
" while @@FETCH_STATUS = 0 begin \n" +
" insert into " + defaultCatalog + "$(defaultSchema)$(prefixName)_data (table_name, event_type, trigger_hist_id, row_data, channel_id, transaction_id, source_node_id, external_data, create_time) \n" +
" values('$(targetTableName)','I', $(triggerHistoryId), @DataRow, @ChannelId, $(txIdExpression), " + defaultCatalog + "dbo.sym_node_disabled(), $(externalSelect), current_timestamp) \n" +
" values('$(targetTableName)','I', $(triggerHistoryId), @DataRow, @ChannelId, $(txIdExpression), " + defaultCatalog + "dbo.($prefixName)_node_disabled(), $(externalSelect), current_timestamp) \n" +
" fetch next from DataCursor into @DataRow $(newKeyVariables), @ChannelId \n" +
" end \n" +
" close DataCursor \n" +
Expand Down Expand Up @@ -177,7 +177,7 @@ public MsSqlTriggerTemplate(ISymmetricDialect symmetricDialect) {
" while @@FETCH_STATUS = 0 begin \n" +
" if ($(dataHasChangedCondition)) begin \n" +
" insert into " + defaultCatalog + "$(defaultSchema)$(prefixName)_data (table_name, event_type, trigger_hist_id, row_data, pk_data, old_data, channel_id, transaction_id, source_node_id, external_data, create_time) \n" +
" values('$(targetTableName)','U', $(triggerHistoryId), @DataRow, @OldPk, @OldDataRow, @ChannelId, $(txIdExpression), " + defaultCatalog + "dbo.sym_node_disabled(), $(externalSelect), current_timestamp)\n" +
" values('$(targetTableName)','U', $(triggerHistoryId), @DataRow, @OldPk, @OldDataRow, @ChannelId, $(txIdExpression), " + defaultCatalog + "dbo.$(prefixName)_node_disabled(), $(externalSelect), current_timestamp)\n" +
" end \n" +
" fetch next from DeleteCursor into @OldPk, @OldDataRow $(oldKeyVariables) \n" +
" fetch next from InsertCursor into @DataRow $(newKeyVariables), @ChannelId \n" +
Expand Down Expand Up @@ -213,7 +213,7 @@ public MsSqlTriggerTemplate(ISymmetricDialect symmetricDialect) {
" fetch next from DataCursor into @OldPk, @OldDataRow $(oldKeyVariables), @ChannelId \n" +
" while @@FETCH_STATUS = 0 begin \n" +
" insert into " + defaultCatalog + "$(defaultSchema)$(prefixName)_data (table_name, event_type, trigger_hist_id, pk_data, old_data, channel_id, transaction_id, source_node_id, external_data, create_time) \n" +
" values('$(targetTableName)','D', $(triggerHistoryId), @OldPk, @OldDataRow, @ChannelId, $(txIdExpression), " + defaultCatalog + "dbo.sym_node_disabled(), $(externalSelect), current_timestamp)\n" +
" values('$(targetTableName)','D', $(triggerHistoryId), @OldPk, @OldDataRow, @ChannelId, $(txIdExpression), " + defaultCatalog + "dbo.$(prefixName)_node_disabled(), $(externalSelect), current_timestamp)\n" +
" fetch next from DataCursor into @OldPk,@OldDataRow $(oldKeyVariables), @ChannelId \n" +
" end \n" +
" close DataCursor \n" +
Expand Down

2 comments on commit b2157ec

@tguless
Copy link

@tguless tguless commented on b2157ec Apr 6, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have a typo - this commit broke these triggers and thus release 3.7.31 for MSSQL server - ($prefixName) should be $(prefixName) on line 96.

@erilong
Copy link
Contributor Author

@erilong erilong commented on b2157ec Apr 6, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very sorry for that mistake. The Windows node on the build server was offline, so there wasn't an email about a failed test, and it got released in the software. It is fixed in 3.7.32, which was just released.

Please sign in to comment.