Opened 11 years ago

Closed 11 years ago

#188 closed defect (invalid)

MySQL driver: create table command cut

Reported by: neteler Owned by: grass-dev@…
Priority: major Milestone: 6.4.0
Component: Default Version: svn-trunk
Keywords: Cc:
CPU: Unspecified Platform: Unspecified

Description

While copying all OSGeo NC data set vector maps from PERMANENT into a "mysql" mapset, I got the following problem:

for i in `g.mlist type=vect map=PERMANENT` ; do 
  echo "------ $i:"
  g.copy vect=$i,my$i
done
...
precip_30ynormals_3d:
Copy vector <precip_30ynormals_3d@PERMANENT> to current mapset as
<myprecip_30ynormals_3d>
DBMI-MySQL driver error:
Cannot create table:
CREATE TABLE myprecip_30ynormals_3d ( cat INTEGER, station DOUBLE, lat DOUBLE, long DOUBLE, elev DOUBLE, jan DOUBLE, feb DOUBLE, mar DOUBLE, apr DOUBLE, may DOUBLE, jun DOUBLE, jul DOUBLE, aug DOUBLE, sep DOUBLE, oct DOUBLE, nov DOUBLE, dec DOUBLE, annual DOUBLE )
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'long DOUBLE, elev DOUBLE, jan DOUBLE, feb DOUBLE, mar DOUBLE, apr DOUBLE, may DO' at line 1
WARNING: Cannot create new table

Apparently the string is cut somewhere. I checked db/drivers/mysql/create_table.c but could not find any reason.

?

Markus

Change History (1)

comment:1 Changed 11 years ago by marisn

Resolution: invalid
Status: newclosed

LONG is MySQL datatype. Rename long column to anything else.

http://dev.mysql.com/doc/refman/5.0/en/blob.html

Note: See TracTickets for help on using tickets.