To use all of MySQL's Spacial Extensions, I need to alter the database engine to MyISAM, It's easy enough to do this from MySQL:

alter table locations_table
engine = myisam; 

or create it this way:

create table pointholder 
(pt Point)
engine = myisam;

But I can't figure out how to get Drupal to set the engine when creating the table or alter the table engine afterward.

Please let me know if you have any suggestions.

Comments

fcharrier’s picture

I'm not an expert of Drupal database API, but you can do this by running your own SQL query:

$sql = "ALTER TABLE {locations_table} ENGINE = myisam";
if (db_query($sql)===FALSE) {
    //  Process error
}
jeditdog’s picture

yeah, if I don't find a way to do it within Drupal's API, I will likely have a maintenance script that runs after an install. That way, it'll be a little more obvious what tasks are being done in and out of the API.

dianikol’s picture

Why do you need to change the engine??? :)

jeditdog’s picture

only MyISAM indexes MySQL's different geometry fields.