[GRASSLIST:9428] Re: DBMI errors with MySQL tables
Dylan Beaudette
dylan.beaudette at gmail.com
Mon Dec 12 17:35:19 EST 2005
Ok , it looks like i have narrowed the problem down a bit:
GRASS6.1-CVS (today) + MySQL 4.1.15 server + MySQL 4.1.15 Client includes
If a table in MySQL connected to a GRASS vector has NULL values in ANY of the
columns, GRASS dies with a DBMI error.
I am pretty sure that this used to work. Were there any changes in the MySQL
API from version 4.0 -> 4.1 that may have caused things to break ?
It looks like this behavior was noted in BUG #3337:
http://intevation.de/rt/webrt?serial_num=3337&display=History
It would be a great help for any ideas on where to start hunting for this
bug...
Thanks in advance!
Dylan
On Monday 12 December 2005 12:30 pm, Dylan Beaudette wrote:
> Greetings,
>
> Lately I have been having a lot of DBMI-related errors when working with
> GRASS{6,6.1-CVS} vectors that have a MySQL table attached to them.
>
> For example, I have a table that looks like this in MySQL:
> gg_bulk_density_points;
> +----------------+-------------+------+-----+---------+-------+
>
> | Field | Type | Null | Key | Default | Extra |
>
> +----------------+-------------+------+-----+---------+-------+
>
> | cat | int(11) | YES | | NULL | |
> | easting | int(11) | YES | | NULL | |
> | northing | int(11) | YES | | NULL | |
> | id | varchar(10) | YES | | NULL | |
> | pedon_id | varchar(20) | YES | | NULL | |
> | the_date | varchar(12) | YES | | NULL | |
> | the_time | varchar(6) | YES | | NULL | |
> | db_ring_hz1 | float | YES | | NULL | |
> | db_ring_hz2 | float | YES | | NULL | |
> | db_ring_hz3 | float | YES | | NULL | |
> | db_ring_hz4 | float | YES | | NULL | |
> | clay_capacity | float | YES | | NULL | |
> | dominant_cover | varchar(20) | YES | | NULL | |
>
> +----------------+-------------+------+-----+---------+-------+
>
> I have connected this table to a vector in GRASS{6,6.1-CVS} like this:
> v.db.connect -o map=gg_bulk_density_points driver=mysql
> table=gg_bulk_density_points database="host=localhost,dbname=test" key=cat
>
> Running db.columns returns:
> db.columns table=gg_bulk_density_points;
> cat
> easting
> northing
> id
> pedon_id
> the_date
> the_time
> db_ring_hz1
> db_ring_hz2
> db_ring_hz3
> db_ring_hz4
> clay_capacity
> dominant_cover
>
> Running db.select on this table gives:
> echo "select * from gg_bulk_density_points" | db.select
> table=gg_bulk_density_points
> dbmi: Protocol error
>
> Running db.select on any other vector in this location, with a MySQL table
> attached to it works fine...
>
> Also: Trying to add this trouble vector+table in QGIS causes QGIS to die
> with "DBMI error"
>
>
> Any Ideas, as this is really starting to drive me nuts!
>
> Could it possibly be a column type issue?
--
Dylan Beaudette
Soils and Biogeochemistry Graduate Group
University of California at Davis
530.754.7341
More information about the grass-user
mailing list