Opened 19 years ago
Last modified 19 years ago
#1073 closed defect (duplicate)
ODBC linestring features limited to 512 bytes
Reported by: | Owned by: | warmerdam | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | default | Version: | unspecified |
Severity: | blocker | Keywords: | |
Cc: |
Description
We use MapServer and OGR. When we tried to enable OGR ODBC driver and pull a layer from SQL Server it would not work although the WKT linestring definitions we put in were good. I found that cpl_odbc.cpp function CPLODBCStatement::Fetch which was processing the SQLFetch response was copying strings into a 512 bytes buffer and chopping it in case it was longer. So the end result was that we got a bad WKT string and no exceptions that would suggest what is the problem. I extended 512 to 8000 which I beleive is the limit for varchar on both SQL Server and Oracle. From that point everything worked great. I suggest extending the buffer to 8000 since it is unrisky and I already tested it. In the future it should be good if the function would trigger an error report instead of chopping the text.
Change History (2)
Note:
See TracTickets
for help on using tickets.