View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003659 | SymmetricDS | Bug | public | 2018-08-03 16:30 | 2019-06-25 18:06 |
Reporter | matthewehoward | Assigned To | |||
Priority | normal | ||||
Status | closed | Resolution | fixed | ||
Product Version | 3.9.2 | ||||
Target Version | 3.10.3 | Fixed in Version | 3.10.3 | ||
Summary | 0003659: SqlAnywhere dialect crashes when DB name has special char | ||||
Description | My client has a (Sybase SqlAnywhere) database named with a "-" which seemed to cause problems in the triggers that SYM creates. For example if the database name is "product-staging" and the schema is "ABC" then the trigger that is created on the tables contains text like below: if(product-staging.ABC.sym_triggers_disabled(0) = 0) begin This causes an exception when we insert/update to this table Column 'product' not found because it reads the "-" as an operator. I've created a patch locally that fixes this by calling SymmetricUtils.quote in both getSyncTriggersExpression and getTransactionTriggerExpression in https://github.com/JumpMind/symmetric-ds/blob/a894239d22e2a602be1dfaf87de9ef059e3d65a7/symmetric-client/src/main/java/org/jumpmind/symmetric/db/sqlanywhere/SqlAnywhereSymmetricDialect.java#L250 This produces the trigger text: if("product-staging".ABC.sym_triggers_disabled(0) = 0) begin I'm fairly sure I should apply the same to the schema name as well - but not sure if there are other places where these should be quoted either in the SqlAnywhere dialect or other dialects. My patch has resolved the issue for my client for now. | ||||
Steps To Reproduce | Point symmetric to a Sybase/SqlAnywhere database named with a "-" in it. | ||||
Tags | dialect: sql anywhere, trigger | ||||
|
submitted PR https://github.com/JumpMind/symmetric-ds/pull/102 |
|
I actually don't get any errors when the schema name has a hyphen in it, similar to what you are saying with the database name. I think this is just a weird thing with the SQL Anywhere driver. Your change does fix the problem with the database name. |
SymmetricDS: 3.9 3ff364e5 2019-05-28 11:49:41 matthoward Committer: jfrees Details Diff |
0003659: SqlAnywhere dialect crashes when DB name has special char (#102) |
Affected Issues 0003659 |
|
mod - symmetric-client/src/main/java/org/jumpmind/symmetric/db/sqlanywhere/SqlAnywhereSymmetricDialect.java | Diff File | ||
SymmetricDS: 3.10 e97e8108 2019-05-28 11:49:41 matthoward Committer: jfrees Details Diff |
0003659: SqlAnywhere dialect crashes when DB name has special char (#102) (cherry picked from commit 3ff364e519d4893ae205b0c372898a322c99ae89) |
Affected Issues 0003659 |
|
mod - symmetric-client/src/main/java/org/jumpmind/symmetric/db/sqlanywhere/SqlAnywhereSymmetricDialect.java | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2018-08-03 16:30 | matthewehoward | New Issue | |
2019-03-03 17:17 | matthewehoward | Note Added: 0001398 | |
2019-04-24 18:38 | elong | Tag Attached: dialect: sql anywhere | |
2019-04-24 18:39 | elong | Tag Attached: trigger | |
2019-05-22 17:51 |
|
Assigned To | => user606 |
2019-05-22 17:51 |
|
Status | new => assigned |
2019-05-22 17:51 |
|
Status | assigned => confirmed |
2019-05-23 17:53 |
|
Status | confirmed => acknowledged |
2019-05-28 15:46 |
|
Note Added: 0001507 | |
2019-05-28 15:54 |
|
Status | acknowledged => resolved |
2019-05-28 15:54 |
|
Resolution | open => fixed |
2019-05-28 15:54 |
|
Fixed in Version | => 3.10.3 |
2019-05-28 16:00 | jfrees | Changeset attached | => SymmetricDS 3.9 3ff364e5 |
2019-05-28 16:00 | jfrees | Changeset attached | => SymmetricDS 3.10 e97e8108 |
2019-06-25 18:06 | admin | Status | resolved => closed |