View Issue Details

IDProjectCategoryView StatusLast Update
0006621SymmetricDSBugpublic2024-11-13 20:31
Reporterpbelov Assigned Topbelov  
Prioritynormal 
Status closedResolutionfixed 
Product Version3.15.0 
Target Version3.15.10Fixed in Version3.15.10 
Summary0006621: NVARCHAR(MAX) and VARCHAR(MAX) columns get modified when another column is updated (SQLServer-specific)
DescriptionNVARCHAR(MAX) and VARCHAR(MAX) columns get modified when another column is updated (SQLServer-specific)
Steps To ReproduceServer db=SQL Server (SymmetricRoot schema)
Client db=SQL Server (SymmetricClient schema)
CREATE TABLE SymmetricRoot (and on SymmetricClient).dbo.test_nvarchar_max(
    col1 nvarchar(7)
    ,col2 int NULL
    ,comments nvarchar(max) NULL
    ,CONSTRAINT UX_RO_LICNO_RO_NO UNIQUE (col1)
);

INSERT INTO SymmetricRoot.dbo.test_nvarchar_max VALUES ('row1', 100, 'TEST_COMMENT_1');
-- Observe row sent over to the Client
-- Run two updates (one on Root, one on Client)
UPDATE SymmetricRoot.dbo.test_nvarchar_max SET col2=200 WHERE col1='row1';
UPDATE SymmetricClient.dbo.test_nvarchar_max SET COMMENTS='TEST_COMMENT_5' WHERE col1='row1';
-- Observe client row loosing it's new value in the COMMENTS column (reset to match Root)
-- Results on Client:
col1='row1'
col2=200
COMMENTS='TEST_COMMENT_1'
Additional InformationThis issue is specific to SQL Server dialect in how it triggers handle the NVARCHAR(MAX) and VARCHAR(MAX) data types.
TagsNo tags attached.

Activities

pbelov

2024-10-23 16:57

manager   ~0002510

PR 203 got merged into 3.15

pbelov

2024-10-24 19:55

manager   ~0002513

Published patch with the code fix:
https://downloads.jumpmind.com/symmetricds/patches/3.15/patch-0006621.jar

Related Changesets

SymmetricDS: 3.15 3a50b1df

2024-10-23 16:28:00

pbelov


Committer: GitHub Details Diff
0006621: Triggers to include NVARCHAR(MAX) and VARCHAR(MAX) columns (MS SQL Server-specific) (0000203)

0006621: Triggers to include NVARCHAR(MAX) and VARCHAR(MAX) columns (MS SQL Server-specific)
Affected Issues
0006621
add - symmetric-client/src/main/java/org/jumpmind/symmetric/db/mssql/MsSql2005TriggerTemplate.java Diff File
mod - symmetric-client/src/main/java/org/jumpmind/symmetric/db/mssql/MsSql2008TriggerTemplate.java Diff File
mod - symmetric-core/src/main/java/org/jumpmind/symmetric/db/AbstractTriggerTemplate.java Diff File
mod - symmetric-db/src/main/java/org/jumpmind/db/platform/mssql/MsSql2005DdlBuilder.java Diff File
mod - symmetric-jdbc/src/main/java/org/jumpmind/db/platform/mssql/MsSql2005DatabasePlatform.java Diff File

Issue History

Date Modified Username Field Change
2024-10-18 19:51 pbelov New Issue
2024-10-18 19:51 pbelov Status new => assigned
2024-10-18 19:51 pbelov Assigned To => pbelov
2024-10-23 16:57 pbelov Status assigned => resolved
2024-10-23 16:57 pbelov Resolution open => fixed
2024-10-23 16:57 pbelov Fixed in Version => 3.15.10
2024-10-23 16:57 pbelov Target Version => 3.15.10
2024-10-23 16:57 pbelov Note Added: 0002510
2024-10-23 17:00 pbelov Changeset attached => SymmetricDS 3.15 3a50b1df
2024-10-24 19:55 pbelov Note Added: 0002513
2024-11-13 20:31 pbelov Status resolved => closed