[GRASS-dev] [GRASS GIS] #2262: t.create fails when mapset name contains a dash

#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&gt;
GRASS GIS <http://grass.osgeo.org>

#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 |
------------------------------+---------------------------------------------

Comment(by huhabla):

Oh, i didn't saw that coming. I need to re-implement the map register name
creation for space time datasets.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2262#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#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 |
------------------------------+---------------------------------------------

Comment(by huhabla):

This should be fixed in r59916.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2262#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#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 |
------------------------------+---------------------------------------------

Comment(by martinl):

Replying to [comment:2 huhabla]:
> This should be fixed in r59916.

Confirmed, thanks! Before closing this ticket, could you please backport
it to relbr70.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2262#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>

#2262: t.create fails when mapset name contains a dash
--------------------------+-------------------------------------------------
  Reporter: martinl | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.0.0
Component: Temporal | Version: svn-trunk
Resolution: fixed | Keywords: t.create, mapset
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Changes (by martinl):

  * status: new => closed
  * resolution: => fixed

Comment:

Replying to [comment:3 martinl]:
> Replying to [comment:2 huhabla]:
> > This should be fixed in r59916.
>
> Confirmed, thanks! Before closing this ticket, could you please backport
it to relbr70.

Ah, already done in r60019. Closing.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2262#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>