Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 327435 - MaxDB trims trailing spaces of VARCHAR fields
Summary: MaxDB trims trailing spaces of VARCHAR fields
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard: maxdb
Keywords:
Depends on:
Blocks: 284657
  Show dependency tree
 
Reported: 2010-10-11 07:17 EDT by Sabine Heider CLA
Modified: 2022-06-09 10:33 EDT (History)
2 users (show)

See Also:


Attachments
skip check for trailling on MaxDB (1.09 KB, patch)
2010-10-11 12:39 EDT, Adrian Goerler CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sabine Heider CLA 2010-10-11 07:17:45 EDT
When reading VARCHAR fields from the database, MaxDB automatically trims all trailing spaces. This is a limitation of the database that can't be changed.

The bug is opened for documentation purposes only.
Comment 1 Sabine Heider CLA 2010-10-11 07:26:13 EDT
The test

org.eclipse.persistence.testing.tests.jpa.fieldaccess.relationships.ExpressionJUnitTestSuite.testRightTrimWithoutTrimChar

fails due to this peculiarity.
Comment 2 Adrian Goerler CLA 2010-10-11 12:39:21 EDT
Created attachment 180610 [details]
skip check for trailling on MaxDB

The test checks that if data with trailing spaces is inserted the trailing spaces can be read again from the database. On MaxDB, this is not possible, as CHAR and VARCHAR data is always implicitly trimmed to the right. 

The proposed patch skips the validation of the trailing spaces on MaxDB.
Comment 3 Adrian Goerler CLA 2010-10-12 16:15:17 EDT
Reviewed by Tom.
Tested on MaxDB.
Checked in at #8352.
Comment 4 Adrian Goerler CLA 2010-10-14 10:19:49 EDT
Noteworthy: 

VARCHAR (n) BYTE columns, whihc correpsonds to the JDBC type VARBINARY, do not preserve trailing 0x00 bytes.
Comment 5 Eclipse Webmaster CLA 2022-06-09 10:33:29 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink