View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004800 | SymmetricDS | Improvement | public | 2021-01-29 13:54 | 2021-02-04 05:49 |
Reporter | avarianik | Assigned To | |||
Priority | low | ||||
Status | new | Resolution | open | ||
Product Version | 3.12.4 | ||||
Summary | 0004800: Subselect router expression improvement | ||||
Description | I catch a bug In my project with symmetricDS, recently. Data events could not been insetred because of key (data_id, batch_id) have been duplicated. During research i found problem in routing process. One of my subselect router produce node which not included in router's target group. The point was in provided router expression: A or B, without parentheses. So full router query was: select c.node_id from sym_node c where c.node_group_id=:NODE_GROUP_ID and c.sync_enabled=1 and A or B When B expression is true all nodes returnes. I know is my fault, but i think i'm not only one, who made a careless mistake. So i propose to add parentheses for concatanable part of sql by default. | ||||
Tags | routing | ||||
|
Makes sense. For subselect, the router expression (for example: A or B) provided by user should be wrapped in parenthesis, like this: select c.node_id from sym_node c where c.node_group_id=:NODE_GROUP_ID and c.sync_enabled=1 and (A or B) |
|
https://github.com/JumpMind/symmetric-ds/pull/140 |