Ticket #4684 (closed defect: fixed)

Opened 12 months ago

Last modified 12 months ago

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
Cc:

Description

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

ogrsqlitedatasource.cpp-empty-select.patch Download (0.6 KB) - added by rblazek 12 months ago.
Patch against 1.8.1

Change History

Changed 12 months ago by rblazek

Patch against 1.8.1

Changed 12 months ago by rouault

  • keywords sqlite added
  • resolution set to fixed
  • status changed from new to closed
  • component changed from default to OGR_SF
  • milestone set to 1.9.2

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

Note: See TracTickets for help on using tickets.