View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003643 | SymmetricDS | Bug | public | 2018-07-23 12:34 | 2018-08-03 14:12 |
Reporter | efraimmachado | Assigned To | josh-a-hicks | ||
Priority | high | ||||
Status | closed | Resolution | fixed | ||
Target Version | 3.9.10 | Fixed in Version | 3.9.10 | ||
Summary | 0003643: Error in DB2 select's for initial load and triggers | ||||
Description | The SymmetricDS code generates a wrong triggers and selects (for initial load) because there are cases when a string column has a empty string a error happens during the execution of replace function. In the class DB2TriggerTemplate, there is a string variable called stringColumnTemplate responsible to define the template to generate triggers and the select used in the initial load. The stringColumnTamplate is: stringColumnTemplate = "case when $(tableAlias).\"$(columnName)\" is null then $(oracleToClob)'' else '\"' || replace(replace($(oracleToClob)$(tableAlias).\"$(columnName)\",'\\','\\\\'),'\"','\\\"') || '\"' end" ; The correct should be like this to avoid the case above: stringColumnTemplate = "case when $(tableAlias).\"$(columnName)\" is null or $(tableAlias).\"$(columnName)\" = '' then $(oracleToClob)'' else '\"' || replace(replace($(oracleToClob)$(tableAlias).\"$(columnName)\",'\\','\\\\'),'\"','\\\"') || '\"' end" ; | ||||
Steps To Reproduce | Run symmetricDS using demo enviromment (db2 zos) and set an row of item table with the name '' (empty string). When the inital load or the item table trigger is executed the error -171 will happen. | ||||
Tags | No tags attached. | ||||
|
Here is a batch to utilize this change. https://www.jumpmind.com/downloads/symmetricds/patches/3.9/patch-0003643.jar |
Date Modified | Username | Field | Change |
---|---|---|---|
2018-07-23 12:34 | efraimmachado | New Issue | |
2018-07-24 19:25 | josh-a-hicks | Note Added: 0001219 | |
2018-07-25 12:32 | josh-a-hicks | Assigned To | => josh-a-hicks |
2018-07-25 12:32 | josh-a-hicks | Status | new => resolved |
2018-07-25 12:32 | josh-a-hicks | Resolution | open => fixed |
2018-07-25 12:32 | josh-a-hicks | Fixed in Version | => 3.9.10 |
2018-07-25 13:00 | josh-a-hicks | Changeset attached | => SymmetricDS 3.9 ad2e7396 |
2018-08-03 14:12 | chenson | Status | resolved => closed |