#4261 closed defect (fixed)
OGR SQL: another `where' versus `-where' issue
Reported by: | peifer | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 1.9.0 |
Component: | OGR_SF | Version: | svn-trunk |
Severity: | normal | Keywords: | OGR_SQL |
Cc: |
Description
When making an inappropriate -where query related to the string type attribute CellCode, ogrinfo gives an error (as expected), but nevertheless returns all features in the dataset, see (1).
When making the same inappropriate query by using -sql "...", I only get the error message, no features are returned, as I would expect, see (2)
(0) $ cat grid.gmt # @VGMT1.0 @GPOLYGON # @R0/20/0/10 # @Je3035 # @NCellCode|EofOrigin|NofOrigin # @Tstring|integer|integer # FEATURE_DATA > # @D10mE0N0|0|0 # @P 0 0 0 10 10 10 10 0 0 0 > # @D10mE1N0|10|0 # @P 10 0 10 10 20 10 20 0 10 0 (1) $ ogrinfo -al -q -geom=no grid.gmt -where CellCode=10mE0N0 ERROR 1: SQL Expression Parsing Error: syntax error Layer name: grid OGRFeature(grid):0 CellCode (String) = 10mE0N0 EofOrigin (Integer) = 0 NofOrigin (Integer) = 0 OGRFeature(grid):1 CellCode (String) = 10mE1N0 EofOrigin (Integer) = 10 NofOrigin (Integer) = 0 (2) $ ogrinfo -q -geom=no grid.gmt -sql "select * from grid where CellCode=10mE0N0" ERROR 1: SQL Expression Parsing Error: syntax error $
Change History (2)
comment:1 by , 13 years ago
Component: | default → OGR_SF |
---|---|
Milestone: | → 1.9.0 |
Resolution: | → fixed |
Status: | new → closed |
comment:2 by , 13 years ago
Note:
See TracTickets
for help on using tickets.
r23119 /trunk/gdal/apps/ (ogr2ogr.cpp ogrinfo.cpp): ogrinfo/ogr2ogr: exit when SetAttributeFilter() fails, instead of silently going on (#4261)