Opened 12 years ago
Closed 12 years ago
#4419 closed defect (fixed)
OGR SQL: ORDER BY doesn't work properly if GetFeatureCount() < number of features
Reported by: | Even Rouault | Owned by: | Even Rouault |
---|---|---|---|
Priority: | normal | Milestone: | 1.9.0 |
Component: | OGR_SF | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: |
Description
OGRGenSQLResultsLayer::CreateOrderByIndex() which is used to process ORDER BY clauses assumes that GetFeatureCount() return exactly the number of features returned by iterating over features with GetNextFeature(). But for a shapefile with deleted records, GetFeatureCount() will over-estimate the number of features. Which in debug mode leads to an assertion, and in release mode leads to potentially garbage or segfaults.
Change History (2)
comment:1 by , 12 years ago
comment:2 by , 12 years ago
Milestone: | → 1.9.0 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Pushed in time for RC2.
Note:
See TracTickets
for help on using tickets.
Fixed in trunk (r23682) and in branches/1.9 (r23683)