Ticket #3058 (closed defect: fixed)

Opened 3 years ago

Last modified 21 months ago

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

Changed 2 years ago by sdlime

  • owner changed from sdlime to hobu
  • component changed from MapServer C Library to Input - Native MS SQL Server Support

Changed 2 years ago by paul

  • cc pauljame@… added

Changed 2 years ago by hobu

  • cc assefa added

Changed 2 years ago by assefa

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.

Changed 2 years ago by assefa

  • milestone set to 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.

Changed 2 years ago by sdlime

  • 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

Changed 2 years ago by assefa

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

Changed 2 years ago by assefa

  • cc sdlime added; stlime removed

Changed 2 years ago by tamas

  • 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

Changed 21 months ago by tamas

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

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

Note: See TracTickets for help on using tickets.