-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Data Corruption: Failed GPKG OID/FID Over-write causes value to spill into next attribute column #42274
Comments
Video of behavior being reproduced: STR.mp4 |
Sample project with sample data sufficient to reproduce the data corruption locally. |
@Saijin-Naib I'm also seeing this on 3.18.0 on Linux, and is pretty easy to corrupt many records in the column next to FID. @Saijin-Naib Can you say if it is a regression? |
@gioman , top of my head, I believe it is. I know in the past I've manually re-calculated FID using this same method and it allowed me to do so. I think some logic was introduced somewhere in 3.16.x to prevent people manually re-creating FIDs, and perhaps this behavior came from that? |
@Saijin-Naib confirmed on 3.16, 3.10, 3.4 and 2.18, so apparently not a regression, but still an horrible bug. |
Oh god... I've definitely trashed tons of data over the years doing this and I only just noticed this time 😬 Thanks for the extensive testing! |
@gioman , do you have any insight as to what "level" this is occuring at? For instance, is this QGIS level or provider (GDAL) level? Should I be filing this issue elsewhere as well? Thanks for any insight! |
not really
I'm sure a core developer will comment here. |
@gioman , Not sure if anyone has gotten eyes-on this yet. Still can be done on 3.18.2, not sure if this warrants being looked at for upcoming 3.20 or other backport/merge windows. |
@Saijin-Naib I will try to let the dev know about this for the next round of bug fixing. |
and that the fid value is included in the fields to update, and that it doesn't change. Also rollback all changes if an update of FID is attempted. Fixes qgis#42274
and that the fid value is included in the fields to update, and that it doesn't change. Also rollback all changes if an update of FID is attempted. Fixes #42274
and that the fid value is included in the fields to update, and that it doesn't change. Also rollback all changes if an update of FID is attempted. Fixes qgis#42274
and that the fid value is included in the fields to update, and that it doesn't change. Also rollback all changes if an update of FID is attempted. Fixes #42274
Describe the bug
After attempting and failing to update the OID of a GPKG layer, a single @row_number was propagated to the next column in the dataset, over-writing attribute data.
How to Reproduce
I was attempting to over-write/re-create the FID of a Geopackage table, and calculated a new FID using the Update Column of @row_number.
After calculating, QGIS throws Information Banner Errors that the OID can not be over-written.
However, the @row_number value for spot 1 (1), was written to the next column JUST for that particular entry.
QGIS and OS versions
QGIS version
3.18.0-Zürich
QGIS code revision
bdef9fb
Compiled against Qt
5.15.2
Running against Qt
5.15.2
Compiled against GDAL/OGR
3.2.1
Running against GDAL/OGR
3.2.2
Compiled against GEOS
3.9.1-CAPI-1.14.2
Running against GEOS
3.9.1-CAPI-1.14.2
Compiled against SQLite
3.33.0
Running against SQLite
3.33.0
Compiled against PDAL
2.2.0
Running against PDAL
2.2.0 (git-version: 38aa11)
PostgreSQL Client Version
13.0
SpatiaLite Version
5.0.1-rc1
QWT Version
6.1.3
QScintilla2 Version
2.11.5
Compiled against PROJ
8.0.0
Running against PROJ
Rel. 8.0.0, March 1st, 2021
OS Version
Windows 10 Version 2009
Active python plugins
CalculateGeometry;
cartography_tools;
ClipMultipleLayers;
MemoryLayerSaver;
project_colors_dock;
slyr;
toggle_labels_widget;
zoom_level;
db_manager;
MetaSearch;
processing
Additional context
Log Messages - OGR:
2021-03-16T09:27:37 WARNING Unbalanced call to leaveUpdateMode() w.r.t. enterUpdateMode()
Log Messages - Messages:
The text was updated successfully, but these errors were encountered: