Opened 14 years ago
Last modified 14 years ago
#3260 reopened defect
OracleSpatial SQL Error w/FUNCTION = NONE
Reported by: | jimk | Owned by: | jimk |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Input - Native Oracle Spatial Support | Version: | 5.6 |
Severity: | normal | Keywords: | |
Cc: | sdlime, jimk, aboudreault |
Description
I can't even get a map to draw in 5.6 (works fine in 5.4)
DATA "POINT FROM (SELECT POINT,FEATURE_ID FROM FEATURES WHERE FEATURE_TYPE_ID = 97) USING UNIQUE FEATURE_ID NONE
The error message is like so (against trunk):
msDrawMap(): Image handling error. Failed to draw layer named 'layer1'. msOracleSpatialLayerWhichShapes(): OracleSpatial error. Error: ORA-01036: illegal variable name/number . Query statement: SELECT FEATURE_ID,, POINT FROM (SELECT POINT,FEATURE_ID FROM FEATURES WHERE FEATURE_TYPE_ID = 97)
Not sure where the extra commas come from in the "Query statement: ..." line. Any ideas?
Attachments (1)
Change History (8)
comment:1 by , 14 years ago
by , 14 years ago
Attachment: | maporaclespatial-funtion-none.patch added |
---|
Fix where msOracleSpatialWhichShapes tries to assign to bind variables that aren't there.
comment:2 by , 14 years ago
Status: | new → assigned |
---|
The problem was the new code that is using bind variables in msOracleSpatialLayerWhichShapes was failing in the case of FUNCTION=NONE because there were no variables to bind. I added a condition so it will not try to assign the bind variables when FUNCTION=NONE.
Steve tried the patch against 5.6 branch and it worked ok.
comment:4 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed in 5.6 branch in r9684. -Steve
comment:5 by , 14 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
5.6 works now. The main trunk segfaults on the same mapfile. I've not tried applying Jim's patch to trunk though. At worse I would have expected the same old error message I was seeing.
Steve
comment:6 by , 14 years ago
It may be related to this ticket: http://trac.osgeo.org/mapserver/ticket/3228
Have to check if we revert the change about duplicate field names in the sql query.
comment:7 by , 14 years ago
Cc: | added |
---|
It is odd is that the Query Statement has two commas back to back, but I don't think that is the core problem.
The following works for me in r9552 which is my latest build.
This also works for me:
However this fails with the illegal variable name/number error:
So... it seems related to having function = NONE.
I suspect this may be related to the change to use bind variables in the SQL instead of passing parameters directly in r9295.