Bug report #8422
Field Calculator doesn't work - spatiaLite
|Affected QGIS version:||master||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||worksforme|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||17191|
I have a SpatiaLite database. When I try and use field calculator on it absolutely nothing happens. I don't get either an error nor any changes to the database.
I've tried using the area calculator, or simply entering the value of "1" (sans quotes). No change.
If I have set it to "create new column" it will create the column, but the values will all be NULL. Update column does nothing at all.
Field Calculator works fine on shapefiles.
Weekly build a13cdf8 - windows 7, x64.
#2 Updated by Jonathan Moules almost 7 years ago
- File Clipboard16.png added
Now updated to d61cb25. A little more testing shows the nature of the problem.
The SL driver is taking a very long time to update the SL database (using https://issues.qgis.org/attachments/6139/Compass_logs_-_Copy.7z from my other ticket).
There are only ~51,000 features in the database.
1) Add dataset
2) Toggle editing
3) Create field "test" -> Integer
4) Field Calculator -> value of "5555" into the "test" field.
5) Turn off editing -> Save changes.
At this point several bad things happen:
- QGIS locks up for five minutes (literally 5 minus) writing to the SL.
- If I attempt to close the attribute window during this time, QGIS crashes.
- If you look at the attached you can see the resource use during the save. This actually covers two saves (the bits where the IO bar is purple are where it is saving). Notice how RAM use keeps going up but isn't freed afterwards. Leak? No other tasks were performed during this QGIS session.
Nothing else is accessing the SL Dataset. The machine is a high end workstation; the dataset is on an SSD. Shouldn't it just take a few seconds to do this update? "update processed set tests = 9876;" in spatialite_gui takes 6.6 seconds.