#2262: t.create fails when mapset name contains a dash
------------------------------+---------------------------------------------
Reporter: martinl | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Temporal | Version: svn-trunk
Keywords: t.create, mapset | Platform: Unspecified
Cpu: Unspecified |
------------------------------+---------------------------------------------
Steps to reproduce:
{{{
g.mapset -c mapset-test
}}}
{{{
t.connect database=/opt/grassdata/nc_spm_08_grass7/mapset-
test/tgis/sqlite.db
}}}
{{{
t.create output=test title="test" desc="test"
CREATE TABLE test_mapset-test_raster_register (
id VARCHAR NOT NULL, -- This colum is a primary key storing the
registered raster map.ids
PRIMARY KEY (id)
);
CREATE INDEX test_mapset-test_raster_register_index ON test_mapset-
test_raster_register (id);INSERT INTO strds_base ( name ,creator ,mapset
,creation_time ,modification_time ,temporal_type ,id ,semantic_type )
VALUES ('test' ,'landa' ,'mapset-test' ,'2014-04-23 19:35:19.818196'
,'2014-04-23 19:35:19.818210' ,'absolute' ,'test@mapset-test' ,'mean') ;
INSERT INTO strds_absolute_time ( start_time ,granularity ,id ,map_time
,end_time ) VALUES (NULL ,NULL ,'test@mapset-test' ,NULL ,NULL) ;
INSERT INTO strds_spatial_extent ( north ,bottom ,west ,top ,proj
,east ,id ,south ) VALUES (NULL ,NULL ,NULL ,NULL ,'XY' ,NULL ,'test
@mapset-test' ,NULL) ;
INSERT INTO strds_metadata ( max_min ,description ,ewres_min ,title
,min_max ,nsres_min ,nsres_max ,number_of_maps ,raster_register
,command ,min_min ,ewres_max ,id ,max_max ,aggregation_type ) VALUES
(NULL ,'test' ,NULL ,'test' ,NULL ,NULL ,NULL ,NULL ,'test_mapset-
test_raster_register' ,'# 2014-04-23 19:35:19
t.create output="test" title="test" desc="test"
' ,NULL ,NULL ,'test@mapset-test' ,NULL ,NULL) ;
File "/opt/src/grass_trunk/dist.x86_64-unknown-linux-
gnu/scripts/t.create", line 83, in <module>
main()
File "/opt/src/grass_trunk/dist.x86_64-unknown-linux-
gnu/scripts/t.create", line 79, in main
semantic, None, grass.overwrite())
File "/opt/src/grass_trunk/dist.x86_64-unknown-linux-
gnu/etc/python/grass/temporal/open_stds.py", line 169, in
open_new_space_time_dataset
sp.insert(dbif)
File "/opt/src/grass_trunk/dist.x86_64-unknown-linux-
gnu/etc/python/grass/temporal/abstract_space_time_dataset.py", line 367,
in insert
dbif.execute_transaction(statement)
File "/opt/src/grass_trunk/dist.x86_64-unknown-linux-
gnu/etc/python/grass/temporal/core.py", line 955, in execute_transaction
self.cursor.executescript(statement)
sqlite3.OperationalError: near "-": syntax error
}}}
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2262>
GRASS GIS <http://grass.osgeo.org>