Bug #7120 CREATE TABLE geom (g GEOMETRY); generates Error No 1178
Submitted: 9 Dec 2004 4:21 Modified: 9 Dec 2004 10:05
Reporter: Roger Merritt Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Query Browser Severity:S2 (Serious)
Version:1.1.2 OS:Windows (Windows 2000)
Assigned to: CPU Architecture:Any

[9 Dec 2004 4:21] Roger Merritt
Description:
mysql> CREATE TABLE geom (g GEOMETRY);

when I run this I get the error:
The storage engine for the table doesn't support GEOMETRY   1178

How to repeat:
on windows - I have very recent downloads, mySQL 4.1, mySQL Query Browser 1.1.2.

Your URL http://dev.mysql.com/doc/mysql/en/Creating_spatial_columns.html gives the example above.

I have run a 'create table script' and created 20 or so tables, so I know most things are right.

I am a GIS Programmer and wanted to see what it took to convert shp2pgsql output to load into mySQL.

If you can help me with this I may well be able to provide a free spatial viewer for windows that will run against mySQL.
[9 Dec 2004 10:05] Hartmut Holzgraefe
GEOMETRY is only supported by the MyISAM table handler so far,
i asume you have installed MySQL selecting "transactional tables"?

You can either change the default table engine to MyISAM
or specificly request MyISAM for GIS related tables:

  CREATE TABLE geom (g GEOMETRY) ENGINE=MyISAM;
[9 Dec 2004 20:30] Roger Merritt
thanks for the quick reply, that fixed the problem - perhaps that Creating_spatial_columns.html should be updated to reflect/remind users of this situation.