Details Ticket 4083


Comment | Reply | Resolve


Serial Number 4083
Subject db.select: fails for dbf tables from external mapsets
Area grass6
Queue grass
Requestors tutey@o2.pl
Owner dcalvelo
Status open
Last User Contact Sat Feb 25 02:31:11 2006 (3 yr ago)
Current Priority 30
Final Priority 70
Due No date assigned
Last Action Sat Jul 15 20:13:57 2006 (2 yr ago)
Created Mon Feb 13 23:56:38 2006 (3 yr ago)

Transaction History Ticket 4083


Mon, Feb 13 2006 23:56:38    Request created by guest  
Subject: db.select: fails for dbf tables from external mapsets

Platform: GNU/Linux/x86
grass obtained from: CVS
grass binary for platform: Compiled from Sources
GRASS Version: 2006-02-13

When db.select is run for a vector layer table from external mapset it fails:
1. We are in mapset 'wlasnosc'
$ g.gisenv
GISDBASE=/home/grassdata
LOCATION_NAME=caves_utm33_se
MAPSET=wlasnosc
GRASS_GUI=text

2. Need info about table poziomice_ln in mapset topo, but error:
$ db.select poziomice_ln@topo
dbmi: Protocol error
dbmi: Protocol error

3. Setting database expicitely doesn't work too:
$ db.select poziomice_ln database=$GISDBASE/$LOCATION_NAME/topo/dbf/
DBMI-DBF driver error:
Cannot open dbf database: //topo/dbf/

No way.

Maciek
Sun, Feb 19 2006 17:35:01    Mail sent by mneteler  
Maciek,

this is not a bug.

> When db.select is run for a vector layer table from external mapset it fails:
> 1. We are in mapset 'wlasnosc'
> $ g.gisenv
> GISDBASE=/home/grassdata
> LOCATION_NAME=caves_utm33_se
> MAPSET=wlasnosc
> GRASS_GUI=text

what means external mapset?

> 2. Need info about table poziomice_ln in mapset topo, but error:
>$ db.select poziomice_ln@topo
>dbmi: Protocol error
>dbmi: Protocol error

This suggests that db.connect wasn't used correctly.

> 3. Setting database expicitely doesn't work too:
> $ db.select poziomice_ln database=$GISDBASE/$LOCATION_NAME/topo/dbf/
> DBMI-DBF driver error:
> Cannot open dbf database: //topo/dbf/

You have to quote it as otherwise the shell starts to interprete:

db.select poziomice_ln database='$GISDBASE/$LOCATION_NAME/topo/dbf/'

Enjoy

 Markus
Sun, Feb 19 2006 17:35:06    Status changed to resolved by mneteler  
Mon, Feb 20 2006 09:50:59    Mail sent by dca.gis@gmail.com  
Return-Path <dca.gis@gmail.com>
Delivered-To grass-bugs@lists.intevation.de
DomainKey-Signature a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=gZIsw7JbvlI9GH2osGKDnXy1xwF0mtuJdzB2hWM/88XqNL/FPmvtgdXrxfD6ALgS3n6J8E9CQIKljahrlPJQ8QYN49qu3RopobuAdeBRMw08K9XJ+03L0fKGlhE08Zm4WkdwP0K3WMkcQ0TRoxdoEIhwI7EoBtOJUTOHdM4G7lk=
Message-ID <1a486f560602200050t7bd7c0f1m59dc95b0dc5392ae@mail.gmail.com>
Date Mon, 20 Feb 2006 03:50:55 -0500
From "Daniel Calvelo" <dca.gis@gmail.com>
To "Request Tracker" <grass-bugs@intevation.de>
Subject Re: [GRASS5] [bug #4083] (grass) db.select: fails for dbf tables from external mapsets
In-Reply-To <20060213225638.7C88A100159@lists.intevation.de>
MIME-Version 1.0
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
Content-Disposition inline
References <20060213225638.7C88A100159@lists.intevation.de>
X-Spam-Status No, hits=-4.9 tagged_above=-999.0 required=3.0 tests=BAYES_00
X-Spam-Level
What does db.describe say?

On 2/13/06, Request Tracker <grass-bugs@intevation.de> wrote:
> this bug's URL: http://intevation.de/rt/webrt?serial_num=3D4083
> -------------------------------------------------------------------------
>
> Subject: db.select: fails for dbf tables from external mapsets
>
> Platform: GNU/Linux/x86
> grass obtained from: CVS
> grass binary for platform: Compiled from Sources
> GRASS Version: 2006-02-13
>
> When db.select is run for a vector layer table from external mapset it fa=
ils:
>
> 1. We are in mapset 'wlasnosc'
> $ g.gisenv
> GISDBASE=3D/home/grassdata
> LOCATION_NAME=3Dcaves_utm33_se
> MAPSET=3Dwlasnosc
> GRASS_GUI=3Dtext
>
> 2. Need info about table poziomice_ln in mapset topo, but error:
> $ db.select poziomice_ln@topo
> dbmi: Protocol error
> dbmi: Protocol error
>
> 3. Setting database expicitely doesn't work too:
> $ db.select poziomice_ln database=3D$GISDBASE/$LOCATION_NAME/topo/dbf/
> DBMI-DBF driver error:
> Cannot open dbf database: //topo/dbf/
>
> No way.
>
> Maciek
>
> -------------------------------------------- Managed by Request Tracker
>
> _______________________________________________
> grass5 mailing list
> grass5@grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass5
>


--
-- Daniel Calvelo Aros


Mon, Feb 20 2006 09:50:59    Status changed to open by _rt_system  
Mon, Feb 20 2006 13:54:58    Mail sent by msieczka  
Markus wote:

> this is not a bug.

Ok. Can I only ask you to answer my questions below? So that I'm sure I really
understand it.

> Maciek wrote:

>> When db.select is run for a vector layer table from external mapset it
>> fails:

> what means external mapset?

I mean a mapset other than the current, working mapset. This is not a
fortunate word indeed.

>> 2. Need info about table poziomice_ln in mapset topo, but error:
>> $ db.select poziomice_ln@topo
>> dbmi: Protocol error
>> dbmi: Protocol error

> This suggests that db.connect wasn't used correctly.

My database connection is OK I think:

GRASS 6.1.cvs (caves_utm33):~ > db.connect -p
driver:dbf
database:$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/
schema:(null)
group:(null)



The problem is that when I run db.select on a table from another mapset, it fails:
1. I'm in mapset "wlasnosc".
2. Run db.select on a table from mapset "melio"

$ db.select cieki@melio
dbmi: Protocol error
dbmi: Protocol error

Is it supposed to behave like that? Or should it understand that I'm referring
to a table in another mapset? The table itself is there OK - when I run
db.select in it's mapset, "melio", it works:

$ db.select cieki
cat|cat_|nazwa|uwagi|doplyw|rzad
1|2.000000|Cicha Woda||odra|1.000000
...

Daniel wrote:

> What does db.describe say?

When I'm not in the mapset where the table in question is stored, it says:

$ db.describe cieki@melio
DBMI-DBF driver error:
Table 'cieki@melio' doesn't exist

WARNING: Cannot describe table

So db.describe is not mapset-aware too...

Maciek
Tue, Feb 21 2006 18:11:14    Mail sent by neteler@itc.it  
Return-Path <neteler@itc.it>
Delivered-To grass-bugs@lists.intevation.de
Date Tue, 21 Feb 2006 18:11:08 +0100
From Markus Neteler <neteler@itc.it>
To Maciek Sieczka via RT <grass-bugs@intevation.de>
Cc dca.gis@gmail.com
Subject Re: [bug #4083] (grass) db.select: fails for dbf tables from external mapsets
Message-ID <20060221171108.GY14024@bartok.itc.it>
References <20060220125458.6676C1005DB@lists.intevation.de>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
In-Reply-To <20060220125458.6676C1005DB@lists.intevation.de>
X-PGP-Key http://www.gdf-hannover.de/neteler/markus_gpgkey.asc
X-PGP-Fingerprint D4D5 2F80 120E AD60 E2F6 2297 21B3 D02B E1E7 E789
User-Agent Mutt/1.5.11
X-Spam-Status No, hits=-4.9 tagged_above=-999.0 required=3.0 tests=BAYES_00
X-Spam-Level
On Mon, Feb 20, 2006 at 01:54:58PM +0100, Maciek Sieczka via RT wrote:
> Markus wote:
> 
> > this is not a bug.
> 
> Ok. Can I only ask you to answer my questions below? So that I'm sure I really
> understand it.
> 
> > Maciek wrote:
> 
> >> When db.select is run for a vector layer table from external mapset it
> >> fails:
> 
> > what means external mapset?
> 
> I mean a mapset other than the current, working mapset. This is not a
> fortunate word indeed.

if you use $MAPSET is should automagically find it. But I am not
db.* expert... 

> >> 2. Need info about table poziomice_ln in mapset topo, but error:
> >> $ db.select poziomice_ln@topo
> >> dbmi: Protocol error
> >> dbmi: Protocol error
> 
> > This suggests that db.connect wasn't used correctly.
> 
> My database connection is OK I think:
> 
> GRASS 6.1.cvs (caves_utm33):~ > db.connect -p
> driver:dbf
> database:$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/
> schema:(null)
> group:(null)
> 
> 
> 
> The problem is that when I run db.select on a table from another mapset, it
fails:
> 
> 1. I'm in mapset "wlasnosc".
> 2. Run db.select on a table from mapset "melio"
> 
> $ db.select cieki@melio
> dbmi: Protocol error
> dbmi: Protocol error
> 
> Is it supposed to behave like that? Or should it understand that I'm referring
> to a table in another mapset? The table itself is there OK - when I run
> db.select in it's mapset, "melio", it works:

Check manually what's written in the location.mapset/vector/vectmap/dbln file.
> $ db.select cieki
> cat|cat_|nazwa|uwagi|doplyw|rzad
> 1|2.000000|Cicha Woda||odra|1.000000
> ...
> 
> Daniel wrote:
> 
> > What does db.describe say?
> 
> When I'm not in the mapset where the table in question is stored, it says:
> 
> $ db.describe cieki@melio
> DBMI-DBF driver error:
> Table 'cieki@melio' doesn't exist
> 
> WARNING: Cannot describe table
> 
> So db.describe is not mapset-aware too...

That's possible but I dunno. The function db_find_database() might
be relevant to study.

I don't know nothing about DBMI, so I cannot help much.

Markus


Tue, Feb 21 2006 22:42:15    Mail sent by msieczka  
Markus wrote:

> Check manually what's written in the location.mapset/vector/vectmap/dbln file.
$ cat /home/grassdata/caves_utm33/melio/vector/cieki/dbln
1 cieki cat $GISDBASE/$LOCATION_NAME/$MAPSET/dbf/ dbf

?

Thanks for your interest Markus. If you have any further ideas please drop a
note.

Maciek
Tue, Feb 21 2006 22:50:18    Mail sent by neteler@itc.it  
Return-Path <neteler@itc.it>
Delivered-To grass-bugs@lists.intevation.de
Date Tue, 21 Feb 2006 22:50:14 +0100
From Markus Neteler <neteler@itc.it>
To Maciek Sieczka via RT <grass-bugs@intevation.de>
Cc dca.gis@gmail.com
Subject Re: [bug #4083] (grass) db.select: fails for dbf tables from external mapsets
Message-ID <20060221215014.GA11714@bartok.itc.it>
References <20060221214215.64F5B1005A8@lists.intevation.de>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
In-Reply-To <20060221214215.64F5B1005A8@lists.intevation.de>
User-Agent Mutt/1.4.1i
X-PGP-Key http://www.gdf-hannover.de/neteler/markus_gpgkey.asc
X-PGP-Fingerprint D4D5 2F80 120E AD60 E2F6 2297 21B3 D02B E1E7 E789
X-Spam-Status No, hits=-4.9 tagged_above=-999.0 required=3.0 tests=BAYES_00
X-Spam-Level
On Tue, Feb 21, 2006 at 10:42:15PM +0100, Maciek Sieczka via RT wrote:
> Markus wrote:
> 
> > Check manually what's written in the location.mapset/vector/vectmap/dbln
file.
> 
> $ cat /home/grassdata/caves_utm33/melio/vector/cieki/dbln
> 1 cieki cat $GISDBASE/$LOCATION_NAME/$MAPSET/dbf/ dbf
> 
> ?
> 
> Thanks for your interest Markus. If you have any further ideas please drop
a note.

try to replace $MAPSET above with the hardcoded name.

If it doesn't help, somehow has to fix the db.* tools,
I assume, the underlying function. Maybe you could get
DanielC interested?

Markus


Wed, Feb 22 2006 09:11:14    Mail sent by msieczka  
Markus wrote:

> try to replace $MAPSET above with the hardcoded name.

It doesn't help:

1. Modified /home/grassdata/caves_utm33/melio/vector/cieki/dbln content to:
"1 cieki cat $GISDBASE/$LOCATION_NAME/melio/dbf/ dbf"

2. I'm in mapset "wlasnosc"

3. $ db.select cieki@melio
dbmi: Protocol error
dbmi: Protocol error

> If it doesn't help, somehow has to fix the db.* tools, I assume, the
> underlying function.

So it is a bug, right?

> Maybe you could get DanielC interested?

Daniel, what do you think?

Maciek
Wed, Feb 22 2006 09:14:55    Mail sent by neteler@itc.it  
Return-Path <neteler@itc.it>
Delivered-To grass-bugs@lists.intevation.de
Date Wed, 22 Feb 2006 09:14:48 +0100
From Markus Neteler <neteler@itc.it>
To Maciek Sieczka via RT <grass-bugs@intevation.de>
Subject Re: [bug #4083] (grass) db.select: fails for dbf tables from external mapsets
Message-ID <20060222081448.GD14899@bartok.itc.it>
References <20060222081114.A2CE41006A0@lists.intevation.de>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
In-Reply-To <20060222081114.A2CE41006A0@lists.intevation.de>
User-Agent Mutt/1.4.1i
X-PGP-Key http://www.gdf-hannover.de/neteler/markus_gpgkey.asc
X-PGP-Fingerprint D4D5 2F80 120E AD60 E2F6 2297 21B3 D02B E1E7 E789
X-Spam-Status No, hits=-4.9 tagged_above=-999.0 required=3.0 tests=BAYES_00
X-Spam-Level
On Wed, Feb 22, 2006 at 09:11:14AM +0100, Maciek Sieczka via RT wrote:
> Markus wrote:
> 
> > try to replace $MAPSET above with the hardcoded name.
> 
> It doesn't help:
> 
> 1. Modified /home/grassdata/caves_utm33/melio/vector/cieki/dbln content to:
> "1 cieki cat $GISDBASE/$LOCATION_NAME/melio/dbf/ dbf"
> 
> 2. I'm in mapset "wlasnosc"
> 
> 3. $ db.select cieki@melio
> dbmi: Protocol error
> dbmi: Protocol error
> 
> > If it doesn't help, somehow has to fix the db.* tools, I assume, the
> > underlying function.
> 
> So it is a bug, right?
> 
> > Maybe you could get DanielC interested?
> 
> Daniel, what do you think?

Consider to write directly to him...

ciao

 Markus


Sat, Feb 25 2006 02:31:11    Mail sent by dca.gis@gmail.com  
Return-Path <dca.gis@gmail.com>
Delivered-To grass-bugs@lists.intevation.de
DomainKey-Signature a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=UFgfyr/se65YPiHQYHxIV09/5fLsZpQPoTHBY2UyIUxiK+LBrMZkNDWremwfRZNtia6sI45O8fwmexVuc8viQSdO64a/kh1V7G6u6plLgi4DxOZ/LpxbHPFF/doo9df6AQcIfluE4ma7pCNDCDhv33o+uFnuZw5MVhHaqrTjBtg=
Message-ID <1a486f560602241731y52468c09gc463ee24089b5c8e@mail.gmail.com>
Date Fri, 24 Feb 2006 20:31:08 -0500
From "Daniel Calvelo" <dca.gis@gmail.com>
To "Maciek Sieczka via RT" <grass-bugs@intevation.de>
Subject Re: [bug #4083] (grass) db.select: fails for dbf tables from external mapsets
Cc neteler@itc.it
In-Reply-To <20060222081114.A2CE41006A0@lists.intevation.de>
MIME-Version 1.0
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
Content-Disposition inline
References <20060222081114.A2CE41006A0@lists.intevation.de>
X-Spam-Status No, hits=-4.9 tagged_above=-999.0 required=3.0 tests=BAYES_00
X-Spam-Level
I'll look into it this week-end. It's puzzling that such basic ops fail...

On 2/22/06, Maciek Sieczka via RT <grass-bugs@intevation.de> wrote:
> Markus wrote:
>
>
>
> > try to replace $MAPSET above with the hardcoded name.
>
>
>
> It doesn't help:
>
>
>
> 1. Modified /home/grassdata/caves_utm33/melio/vector/cieki/dbln content t=
o:
>
> "1 cieki cat $GISDBASE/$LOCATION_NAME/melio/dbf/ dbf"
>
>
>
> 2. I'm in mapset "wlasnosc"
>
>
>
> 3. $ db.select cieki@melio
>
> dbmi: Protocol error
>
> dbmi: Protocol error
>
>
>
> > If it doesn't help, somehow has to fix the db.* tools, I assume, the
>
> > underlying function.
>
>
>
> So it is a bug, right?
>
>
>
> > Maybe you could get DanielC interested?
>
>
>
> Daniel, what do you think?
>
>
>
> Maciek
>
>
>
> -------------------------------------------- Managed by Request Tracker
>


--
-- Daniel Calvelo Aros


Thu, Jul 13 2006 14:48:23    User changed to tutey@o2.pl by bernhard  
Sat, Jul 15 2006 20:13:57    Owner changed to dcalvelo by mneteler  
Comment | Reply | Resolve

You are currently authenticated as guest.
[Show Configuration] [Login as another user]

Users Guide - Mail Commands - Homepage of RequestTracker 1.0.7 - list any request