Opened 11 years ago

Closed 11 years ago

#4684 closed defect (fixed)

OGR SQLite ExecuteSQL returns NULL if result of SELECT is empty

Reported by: rblazek Owned by: warmerdam
Priority: normal Milestone: 1.9.2
Component: OGR_SF Version: unspecified
Severity: normal Keywords: sqlite


OGRSQLiteDataSource::ExecuteSQL returns NULL is result of executed SELECT statement is empty (which may be correct result). It should return empty but valid OGRLayer instead.

If this happen in Mapserver, it fails to render a (empty) map and returns error.

I have got around this applying the patch attached. I am not sure if it is 100% correct but definitely better than to return NULL.

Attachments (1)

ogrsqlitedatasource.cpp-empty-select.patch (564 bytes ) - added by rblazek 11 years ago.
Patch against 1.8.1

Download all attachments as: .zip

Change History (2)

by rblazek, 11 years ago

Patch against 1.8.1

comment:1 by Even Rouault, 11 years ago

Component: defaultOGR_SF
Keywords: sqlite added
Milestone: 1.9.2
Resolution: fixed
Status: newclosed

Thanks. Fixed in trunk (r24508) and in branches/1.9 (r24509)

Note: See TracTickets for help on using tickets.