Opened 15 years ago

Closed 14 years ago

#3058 closed defect (fixed)

MSSQL2008 and nquery return only: "Content-type: text/html"

Reported by: subby Owned by: tamas
Priority: normal Milestone: 6.0 release
Component: Input - Native MS SQL Server Support Version: unspecified
Severity: normal Keywords:
Cc: pauljame@…, assefa, sdlime

Description

Problem with use of mssql 2008 and nquery with both CGI and C#. When I use shape-file both mode=map and mode=query works with CGI and C#. When I use mssql2008 with CGI mode=map works, but nquery output "Content-type: text/html". When I do it in C# it get an exception: "Attempted to read or write protected memory. This is often an indication that other memory has been corrupted" when I call the metode: "queryByRect".

Change History (10)

comment:1 by sdlime, 14 years ago

Component: MapServer C LibraryInput - Native MS SQL Server Support
Owner: changed from sdlime to hobu

comment:2 by paul, 14 years ago

Cc: pauljame@… added

comment:3 by hobu, 14 years ago

Cc: assefa added

comment:4 by assefa, 14 years ago

delay on my part: my sql 2008 is not working on my current laptop. I am reinstalling sql express 2008 at the moment ... sorry for the delay.

comment:5 by assefa, 14 years ago

Milestone: 6.0 release

had a look at this tonight. From what I can see, the problem comes from the fact that the LayerResultsGetShape method is not yet implemented fr this driver (and is used for for queries). I had a look to see if this would be an easy implenetation but It is not (at least not for me). Howard, I can provide a testing/debugging environment at the code sprint if you are willing to look this with me.

comment:6 by sdlime, 14 years ago

Cc: stlime added

This driver may just need layer close and a layer open call sequence at the end of a query operation or more likely the beginning of a query presentation operation. With that the code would behave as it did in 5.4.

Steve

comment:7 by assefa, 14 years ago

I just check 5.4 and did a simple query: ...&mode=nquery&layers=prov_bound&mapshape=.... and It crashes. I don't think this has ever worked with this driver. Is this possible? Steve, If It used to work in 5.4, can you please provide a patch or more guidance that I can apply and test. Thanks

comment:8 by assefa, 14 years ago

Cc: sdlime added; stlime removed

comment:9 by tamas, 14 years ago

Owner: changed from hobu to tamas

The following issues have been discovered and fixed with regards to the query handling:

  • Added a default imlementation of LayerResultsGetShape (causing a systematic failure as of the single-pass query implementation)
  • Changed the query shape to POINT instead of POLYGON when the area of the query shape is zero (causing a failure at the server)
  • Fixed the buffer length when creating the query shape (to prevent from the memory corruption error)
  • Added advanced error reporting on the msDebug output
  • Added the OID to the field list of the query select statement (causing errors when retrieving the columns)

The fix have been applied in r9922 and r9923

comment:10 by tamas, 14 years ago

Resolution: fixed
Status: newclosed

Closing this ticket since no further issues reported as of the recent changes

Note: See TracTickets for help on using tickets.