Ticket #2260 (closed defect: fixed)

Opened 6 years ago

Last modified 4 years ago

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

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

Change History

Changed 4 years ago by msmitherdc

  • milestone set to 5.4 release

Changed 4 years ago by msmitherdc

Patch to increase TEXT variable size

Changed 4 years ago by sdlime

  • owner changed from fsimon@… to sdlime
  • status changed from new to assigned

Why 4000 and not 1000, 2000 or 5000?

Steve

Changed 4 years ago by sdlime

  • cc fsimon@… added

Changed 4 years ago by unicoletti

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

Changed 4 years ago by sdlime

  • status changed from assigned to closed
  • resolution set to fixed

Fixed in r8543. Marking as fixed.

Steve

Changed 4 years ago by jhevenor

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

Changed 4 years ago by sdlime

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.