Bug report #2170
spatialite problems with reserved word column name
Status: | Closed | ||
---|---|---|---|
Priority: | Low | ||
Assignee: | nobody - | ||
Category: | Data Provider | ||
Affected QGIS version: | Regression?: | No | |
Operating System: | Linux | Easy fix?: | No |
Pull Request or Patch supplied: | Resolution: | fixed | |
Crashes QGIS or corrupts data: | Copied to github as #: | 12230 |
Description
I have a spatialite table with a column called 'UPDATE'. Loading into Qgis causes problems accessing the attributes. The attribute table comes up all 'ERROR', and querying points on the map cause error messages and the map layer points to all disappear. Pretty reproducible.
Streams of these appear:
SQL: near "UPDATE": syntax error
Critical: SQLite error: SELECT ROWID, TYPE, SITECODE, DATE, UPDATE, [etc]
which looks like column names are unquoted and so reserved words for column names will break stuff.
[This database was full of tricksy names, such as tables called "region-code" and "stuff with spaces" that needed quoting and munging as I converted it from mdb to spatialite. Thought I'd got 'em all!]
Associated revisions
fix #2170: (double-quoting any SQL table or column name)
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12324 c8812cc2-4d05-0410-92ff-de0c093fc19c
fix #2170: (double-quoting any SQL table or column name)
git-svn-id: http://svn.osgeo.org/qgis/trunk@12324 c8812cc2-4d05-0410-92ff-de0c093fc19c
History
#1 Updated by Sandro Furieri almost 15 years ago
- Resolution set to fixed
- Status changed from Open to Closed
fixed in rev.12324
I've attached the sample DB I used for actual testing