[GRASS-user] v.in.db accept DECIMAL'S?
Markus Neteler
neteler at osgeo.org
Tue Apr 7 03:41:06 EDT 2009
On Tue, Apr 7, 2009 at 9:25 AM, Markus Neteler <neteler at osgeo.org> wrote:
> On Tue, Apr 7, 2009 at 12:47 AM, Jhon Ortiz <eljhonjhon at hotmail.com> wrote:
>> Hi all,
>>
>> I'm trying to create a new vector (points) map from a mysql database table
>>
>> v.in.db --overwrite table=data_wells driver=mysql
>> database="host=localhost,dbname=Eoceno" x=Este y=Norte z=Salinity_Index
>> key=Cat output=Pozos
>>
>> but I get this error:
>>
>> WARNING: MySQL driver: column 'Salinity_Index', type 246 is not supported
>
>
> I have searched that and found
>
> grep 246 /usr/include/mysql/mysql_com.h
> MYSQL_TYPE_NEWDECIMAL=246,
>
> I suspect that this change is sufficient to solve the problem:
> --- db/drivers/mysql/describe.c (revision 36267)
> +++ db/drivers/mysql/describe.c (working copy)
> @@ -177,6 +177,7 @@
> break;
>
> case MYSQL_TYPE_DECIMAL:
> + case MYSQL_TYPE_NEWDECIMAL:
> *sqltype = DB_SQL_TYPE_DECIMAL;
> break;
Ah, I already suggested it in 2007 to someone else but there was
no feedback:
https://wald.intevation.org/tracker/index.php?func=detail&aid=524&group_id=21&atid=204
> Do you have a possibility to compile and test?
Please :) Or someone else with a running Mysql installation.
Markus
More information about the grass-user
mailing list