diff options
Diffstat (limited to 'myisam/mi_create.c')
-rw-r--r-- | myisam/mi_create.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/myisam/mi_create.c b/myisam/mi_create.c index 838d647ea56..683640630f6 100644 --- a/myisam/mi_create.c +++ b/myisam/mi_create.c @@ -242,6 +242,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, key_length=pointer; if (keydef->flag & HA_SPATIAL) { +#ifdef HAVE_SPATIAL /* BAR TODO to support 3D and more dimensions in the future */ uint sp_segs=SPDIMS*2; keydef->flag=HA_SPATIAL; @@ -270,6 +271,10 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, key_length+=SPLEN*sp_segs; length++; /* At least one length byte */ min_key_length_skip+=SPLEN*2*SPDIMS; +#else + my_errno= HA_ERR_UNSUPPORTED; + goto err; +#endif /*HAVE_SPATIAL*/ } else if (keydef->flag & HA_FULLTEXT) @@ -588,6 +593,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, for (j=0 ; j < keydefs[i].keysegs-sp_segs ; j++) if (mi_keyseg_write(file, &keydefs[i].seg[j])) goto err; +#ifdef HAVE_SPATIAL for (j=0 ; j < sp_segs ; j++) { HA_KEYSEG sseg; @@ -603,6 +609,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, if (mi_keyseg_write(file, &sseg)) goto err; } +#endif } /* Create extra keys for unique definitions */ offset=reclength-uniques*MI_UNIQUE_HASH_LENGTH; |