#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)
Change History (8)
comment:1 by , 15 years ago
Milestone: | → 5.4 release |
---|
by , 15 years ago
Attachment: | maporacletextpatch.txt added |
---|
comment:2 by , 15 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Why 4000 and not 1000, 2000 or 5000?
Steve
comment:3 by , 15 years ago
Cc: | added |
---|
comment:4 by , 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 , 15 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed in r8543. Marking as fixed.
Steve
comment:6 by , 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 , 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
Patch to increase TEXT variable size