Bug report #19009

GeoPackage: Error when adding fields

Added by Jérôme Guélat over 6 years ago. Updated over 6 years ago.

Status:Closed
Priority:High
Assignee:Even Rouault
Category:Data Provider/OGR
Affected QGIS version:3.0.3 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:26840

Description

I get an error when saving edits after adding more than one field to a GeoPackage

1. Open the attached GeoPackage
2. In the attribute table, click on "Open field calculator", inside the field calculator add an integer field with some value
3. Stop editing and save edits
4. Repeat step 2
5. Repeat step 3

I get the following error message:

Errors: SUCCESS: 1 attribute(s) added.
ERROR: field with index 1 is not the same!
Provider: ogr
Storage: GPKG
expected field: name=adfsd type=int typeName=Integer len=10 precision=0
retrieved field: name=adfsd type=int typeName=Integer len=0 precision=0

I'm using QGIS 3.0.3 (with GDAL/OGR 2.2.4), installed with OSGeo4W.

test.gpkg (120 KB) Jérôme Guélat, 2018-05-23 09:46 AM

Associated revisions

Revision f4bf1ec9
Added by Even Rouault over 6 years ago

[OGR provider] GPKG: allow repeated creation of int fields with len != 0 (fixes #19009)

History

#1 Updated by Jérôme Guélat over 6 years ago

The bug is also occurring on QGIS 2.18.20 (tested on different computers)

#2 Updated by Jérôme Guélat over 6 years ago

This bug looks similar to https://issues.qgis.org/issues/15614

#3 Updated by Even Rouault over 6 years ago

  • Assignee set to Even Rouault

#4 Updated by Even Rouault over 6 years ago

  • % Done changed from 0 to 100
  • Status changed from Open to Closed

Also available in: Atom PDF