[GRASS-dev] [GRASS GIS] #315: v.db.join fails in winNative Grass 6.3 for sqlite driver

#315: v.db.join fails in winNative Grass 6.3 for sqlite driver
-----------------------+----------------------------------------------------
Reporter: aprasad | Owner: grass-dev@lists.osgeo.org
     Type: defect | Status: new
Priority: major | Milestone: 6.4.0
Component: Database | Version: 6.3.0
Keywords: v.db.join | Platform: MSWindows XP
      Cpu: x86-32 |
-----------------------+----------------------------------------------------
Grass 6.3.0 winNative (WinGRASS-6.3.0-4-Setup.exe)

NOTE: I know this is a bug because the exact same set of commands works
fine on Ubuntu Linux Grass 6.3.0:

GRASS 6.3.0 (eastwide):C:\GRASS_Native >db.connect driver=sqlite
database=c:/grassdb/eastwide/prasad/sqlite/ew.db

GRASS 6.3.0 (eastwide):C:\GRASS_Native >db.copy from_driver=dbf
from_database=c:/grassdb/eastwide/prasad/dbf from_table=ew20km
to_driver=sqlite to_database=c:/grassdb/eastwide/prasad/sqlite/ew.db
to_table=ew20kmsql

GRASS 6.3.0 (eastwide):C:\GRASS_Native >db.tables -p
curr_pred
ew20kmsql

GRASS 6.3.0 (eastwide):C:\GRASS_Native >v.db.connect -o map=ew20km
driver=sqlite
  database=c:/grassdb/eastwide/prasad/sqlite/ew.db table=ew20kmsql key=cat
layer=1

The table <ew20kmsql> is now part of vector map <ew20km> and may be
deleted
or overwritten by GRASS modules

GRASS 6.3.0 (eastwide):C:\GRASS_Native >db.columns ew20kmsql
cat
AREA
PERIMETER
EW20KM_
EW20KMID
DOCLINK

GRASS 6.3.0 (eastwide):C:\GRASS_Native >db.columns curr_pred
ewid
ppt
pptmaysep
tjan
tjul
juljandiff
tmaysep
tavg
...

GRASS 6.3.0 (eastwide):C:\GRASS_Native >v.db.connect -p -c map=ew20km
Vector map <ew20km> is connected by:
layer <1> table <ew20kmsql> in database
<c:/grassdb/eastwide/prasad/sqlite/ew.db> through driver <sqlite> with key
<cat>

GRASS 6.3.0 (eastwide):C:\GRASS_Native >v.db.join map=ew20km
column=EW20KMID otable=curr_pred ocolumn=ewid

ERROR: Column <> not found in table <ew20km> at layer 1

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/315&gt;
GRASS GIS <http://grass.osgeo.org>

#315: v.db.join fails in winNative Grass 6.3 for sqlite driver
---------------------------+------------------------------------------------
  Reporter: aprasad | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: Database | Version: 6.3.0
Resolution: | Keywords: v.db.join
  Platform: MSWindows XP | Cpu: x86-32
---------------------------+------------------------------------------------
Comment (by aprasad):

I found out the reason - the v.db.join script in winNative does not parse
the input arguments with the correct case ...for example $GIS_OPT_column
is not recognized in the script - when I changed it to $GIS_OPT_COLUMN it
worked....this is true for other parsed input arguments....hopefully this
will help correct the bug.

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

#315: v.db.join fails in winNative Grass 6.3 for sqlite driver
---------------------------+------------------------------------------------
  Reporter: aprasad | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: Database | Version: 6.3.0
Resolution: | Keywords: v.db.join
  Platform: MSWindows XP | Cpu: x86-32
---------------------------+------------------------------------------------
Comment (by glynn):

Replying to [comment:1 aprasad]:
> I found out the reason - the v.db.join script in winNative does not
parse the input arguments with the correct case ...for example
$GIS_OPT_column is not recognized in the script - when I changed it to
$GIS_OPT_COLUMN it worked....this is true for other parsed input
arguments....hopefully this will help correct the bug.

Fixed in r33630 (trunk); recommend back-porting.

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

#315: v.db.join fails in winNative Grass 6.3 for sqlite driver
---------------------------+------------------------------------------------
  Reporter: aprasad | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: closed
  Priority: major | Milestone: 6.4.0
Component: Database | Version: 6.3.0
Resolution: fixed | Keywords: v.db.join
  Platform: MSWindows XP | Cpu: x86-32
---------------------------+------------------------------------------------
Changes (by neteler):

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

Comment:

Done for 6.4.svn and 6.3.svn

Markus

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