Bug report #9062

QgsOgrFeatureIterator always fetch all feature attributtes but are unnecessary

Added by Alvaro Huarte almost 6 years ago. Updated almost 6 years ago.

Status:Closed
Priority:Normal
Assignee:Alvaro Huarte
Category:Data Provider/OGR
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:Yes Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:17709

Description

There is a bug in QgsOgrFeatureIterator::ensureRelevantFields(), the feature cursor always fetchs all attributes ignoring the relevant fields configuration of the feature request.

This method doesn´t assign the relevant fields of the ogrLayer managed in the feature cursor, it modifies the relevant field definition of a ogrLayer related in the provider.

The feature cursor works with unmodified configuration of the ogrLayer fetching all attributes from the related dataset.

Associated revisions

Revision af73f30c
Added by Jürgen Fischer almost 6 years ago

ogr provider: actually only use relevant fields in feature iterator (fixes #9062)

History

#1 Updated by Alvaro Huarte almost 6 years ago

  • Affected QGIS version changed from 2.0.1 to master
  • Pull Request or Patch supplied changed from No to Yes
  • Resolution set to fixed/implemented
  • % Done changed from 0 to 100

#2 Updated by Jürgen Fischer almost 6 years ago

  • Status changed from Open to Closed

#3 Updated by Alvaro Huarte almost 6 years ago

Thanks!

Also available in: Atom PDF