#5472 closed defect (fixed)
GPKG: Layers with dashes in the name cause sqlite errors
Reported by: | ryanl | Owned by: | Even Rouault |
---|---|---|---|
Priority: | normal | Milestone: | 2.0.0 |
Component: | OGR_SF | Version: | 1.11.0 |
Severity: | normal | Keywords: | geopackage, gpkg |
Cc: |
Description
Layers with a dash '-' causes the gpkg driver to exit with:
$ ogr2ogr -f gpkg hyphen.gpkg some-layer.shp ERROR 1: sqlite3_exec(CREATE TABLE some-layer ( fid INTEGER PRIMARY KEY AUTOINCREMENT, geom LINESTRING )) failed: near "-": syntax error ERROR 1: Terminating translation prematurely after failed
I was unable to find anything preventing dashes in the geopackage spec, so this could be fixed by quoting the name at ogrgeopackagedatasource.cpp:797
, alternatively the check at ogrgeopackagedatasource.cpp:753
could be improved as strspn
will only check for illegal prefixes.
Change History (2)
comment:1 by , 10 years ago
Milestone: | → 2.0 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
trunk r27343 "GPKG: allow table names with dash character (#5472)"