[GRASS-dev] Re: [GRASS GIS] #809: v.db.addtable consistently fails
in winGrass
GRASS GIS
trac at osgeo.org
Sat Jan 9 04:55:58 EST 2010
#809: v.db.addtable consistently fails in winGrass
------------------------------+---------------------------------------------
Reporter: JonBall | Owner: grass-dev at lists.osgeo.org
Type: defect | Status: new
Priority: critical | Milestone: 6.4.0
Component: Vector | Version: svn-releasebranch64
Resolution: | Keywords: v.db.addtable, wingrass
Platform: MSWindows Vista | Cpu: x86-64
------------------------------+---------------------------------------------
Comment (by hamish):
Replying to [comment:20 hamish]:
> stuff to audit:
{{{
lib/db/dbmi_base/login.c
dbmi_base/login.c: ret = sscanf(buf, "%[^ ] %[^ ] %[^ ] %[^ ]", dr,
db, usr, pwd);
}}}
This one will fail if the database path or passwd has spaces in it.
In grass 6 this file is ~/.grasslogin6. In grass 7 it is in
~/.grass7/dblogin.
- What this means is that Postgre, MySQL, etc will currently fail on
WinGrass unless the databases are installed in a dir without spaces in
them- which you may not have easy control over. I don't use those, so have
nothing to test with. Hopefully someone who does use a DB that runs a
server can have a look at this.
Because it is a different file for grass 7 we don't have to worry about
transitioning. So I've gone ahead and converted that to use "|" as the sep
already.
GRASS 6 will have to worry about forward/backward compatibility, so needs
the full G_tokenize() treatment like vector/MAP/dbln got.
----
{{{
dbmi_base/dbmscap.c: if (sscanf(buf, "%[^:]:%[^:]:%[^:\n]", name,
startup, comment) == 3)
dbmi_base/dbmscap.c: else if (sscanf(buf, "%[^:]:%[^:\n]", name,
startup) == 2)
}}}
these two are in old commented out code from grass 5 & not of concern.
Hamish
ps - see also #629 "WinGRASS: spaces in pathnames"
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/809#comment:21>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list