View Issue Details

IDProjectCategoryView StatusLast Update
0003684SymmetricDSBugpublic2018-08-31 09:33
ReportermmichalekAssigned Tommichalek 
Prioritynormal 
Status closedResolutionfixed 
Product Version3.9.12 
Target Version3.9.13Fixed in Version3.9.13 
Summary0003684: Load Filter Beanshell variables are not properly scoped
DescriptionLoad filter bean shell can see variables from previous rows, whenever that variable name was not overwritten by the current row.

Given this DML on the corp with the demo set:
update item set name = '1235 updated4' where item_id = 1235;
insert into "DEMO-CORP"."PUBLIC"."ITEM" ("ITEM_ID", "NAME") values (1239,'1239 desc');

And this before write load filter on the "item" table:
print(table.getName() + ": OLD_NAME/NAME: " + OLD_NAME + "/" + NAME);
return NAME;

The output showed that the load filter could see the old_name from the update.
item: OLD_NAME/NAME: 1235 updated3/1235 updated4
item: OLD_NAME/NAME: 1235 updated3/1239 desc

The corrected code produces this output:
item: OLD_NAME/NAME: 1235 updated3/1235 updated4
item: OLD_NAME/NAME: void/1239 desc

Activities

There are no notes attached to this issue.

Related Changesets

SymmetricDS: 3.9 04bed138

2018-08-21 15:03:34

mmichalek

Details Diff
0003684: Load Filter Beanshell variables are not properly scoped
0003684
mod - symmetric-core/src/main/java/org/jumpmind/symmetric/load/BshDatabaseWriterFilter.java Diff File

Issue History

Date Modified Username Field Change
2018-08-21 14:24 mmichalek New Issue
2018-08-21 14:24 mmichalek Status new => assigned
2018-08-21 14:24 mmichalek Assigned To => mmichalek
2018-08-21 15:03 mmichalek Status assigned => resolved
2018-08-21 15:03 mmichalek Resolution open => fixed
2018-08-21 15:03 mmichalek Fixed in Version => 3.9.13
2018-08-21 16:00 mmichalek Changeset attached => SymmetricDS 3.9 04bed138
2018-08-31 09:33 chenson Status resolved => closed