Opened 17 years ago

Closed 15 years ago

Last modified 15 years ago

#2260 closed defect (fixed)

OracleSpatial driver - VARCHAR2(4000)

Reported by: jimk Owned by: sdlime
Priority: normal Milestone: 5.4 release
Component: Input - Native Oracle Spatial Support Version: unspecified
Severity: normal Keywords:
Cc: umberto.nicoletti@…, fsimon@…

Description

The Oracle spatial driver does not handle reading VARCHAR2 columns where there is more than 256 characters. When Mapserver tries to access the one of these columns an error is generated in msOracleSpatialLayerGetShape() stating that Oracle had to truncate one of the fields.

To get around this I increased the TEXT_SIZE define in maporaclespatial.c to 4000.

The downside to this change appears to be increased memory usage.

Attachments (1)

maporacletextpatch.txt (93 bytes ) - added by msmitherdc 15 years ago.
Patch to increase TEXT variable size

Download all attachments as: .zip

Change History (8)

comment:1 by msmitherdc, 15 years ago

Milestone: 5.4 release

by msmitherdc, 15 years ago

Attachment: maporacletextpatch.txt added

Patch to increase TEXT variable size

comment:2 by sdlime, 15 years ago

Owner: changed from fsimon@… to sdlime
Status: newassigned

Why 4000 and not 1000, 2000 or 5000?

Steve

comment:3 by sdlime, 15 years ago

Cc: fsimon@… added

comment:4 by unicoletti, 15 years ago

Because 4000 is the longest VARCHAR size available in Oracle. For even longer text one has to use BLOB or CLOB.

comment:5 by sdlime, 15 years ago

Resolution: fixed
Status: assignedclosed

Fixed in r8543. Marking as fixed.

Steve

comment:6 by jhevenor, 15 years ago

Could a char * or string be used instead of the large array? Jimk's first report mentions the memory increase in this approach.

comment:7 by sdlime, 15 years ago

If I understand the impact you'd see an extra 3744 bytes for every varchar attribute in your result set. So as things sit now even with large result sets memory usage should still be modest. That could well change if we somehow cache query results and a more dynamic allocation approach might be taken. I don't know the Oracle APIs well enough to know if they make the actual size of a varchar column readily available.

Those using the 5.4 code, are you seeing adverse effects?

Steve

Note: See TracTickets for help on using tickets.