View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004028 | SymmetricDS | Bug | public | 2019-06-28 09:45 | 2019-10-30 16:48 |
Reporter | jtsunxp | Assigned To | elong | ||
Priority | high | ||||
Status | closed | Resolution | fixed | ||
Product Version | 3.9.21 | ||||
Target Version | 3.10.4 | Fixed in Version | 3.10.4 | ||
Summary | 0004028: failed to sync when Oracle column which datatype is char changes it's value to chinese characters | ||||
Description | (MY SYMMETRIC SETTING : 1 MASTER NODE(ORACLE) ,1 SLAVE NODE1(ORACLE), 1 SLAVE NODE2(MYSQL) WHEN SYNC FROM ORACLE TO ORACLE, ERROR OCCURED, AND Sql message in sym_outgoing_batch is : ORA-12899: value too large for column "INFOPUB"."T_TEST"."NAME_CHAR" (actual: 103, maximum: 100) Here datatype of column INFOPUB.T_TEST.NAME_CHAR is char(100). The parameter "nls_language" in my oracle is "SIMPLIFIED CHINESE". I tested as following cases: 1: SYMMETRIC version: 3.9.20,3.9.21,3.8.43,3.10.3, above bug occured every times. 2: symmetric 3.5.10 has no such bug. 3: COLUMNS WITH VARCHAR2 DATATYPE HAVE NO ABOVE BUG Can anyone give me some helps? or I dont config some parameter in SYMMETRIC? | ||||
Tags | No tags attached. | ||||
|
|
|
On Oracle, it has a setting to pad CHAR fields with spaces to their max size. (I think that feature has to do with preserving the the space padding that Oracle naturally does across other database platforms.) The padding routine uses the number of characters instead of number of bytes. With multi-byte character sets, this causes a problem. For example, the field is defined as 100 bytes, and you try to sync 3 multi-byte characters, so it does the wrong math of padding 97 spaces. (Instead, it should calculate how many bytes are left in the field.) I fixed the padding routine to account for multi-byte characters. (Maybe we should consider a parameter to turn off the padding in case someone doesn't want it.) I'm attaching a patch file for 3.10 version of SymmetricDS if you want to test it. |
|
|
SymmetricDS: 3.10 95f5221a 2019-07-02 14:01:26 Details Diff |
0004028: correctly pad CHAR field when using multi-byte characters |
Affected Issues 0004028 |
|
mod - symmetric-db/src/main/java/org/jumpmind/db/model/Column.java | Diff File | ||
mod - symmetric-db/src/main/java/org/jumpmind/db/platform/AbstractDatabasePlatform.java | Diff File | ||
mod - symmetric-jdbc/src/main/java/org/jumpmind/db/platform/AbstractJdbcDdlReader.java | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2019-06-28 09:45 | jtsunxp | New Issue | |
2019-06-28 10:01 | jtsunxp | File Added: bug1.png | |
2019-07-02 17:58 | elong | Note Added: 0001546 | |
2019-07-02 17:59 | elong | Assigned To | => elong |
2019-07-02 17:59 | elong | Status | new => assigned |
2019-07-02 17:59 | elong | Target Version | => 3.10.4 |
2019-07-02 17:59 | elong | File Added: patch-0004028.jar | |
2019-07-02 18:01 | elong | Status | assigned => resolved |
2019-07-02 18:01 | elong | Resolution | open => fixed |
2019-07-02 18:01 | elong | Fixed in Version | => 3.10.4 |
2019-07-02 19:00 | admin | Changeset attached | => SymmetricDS 3.10 95f5221a |
2019-08-23 16:46 | admin | Status | resolved => closed |
2019-10-30 16:48 | elong | Relationship added | related to 0004136 |