Commit 4f919bee authored by Jan Lindström's avatar Jan Lindström

Enable Geometry datatype for SPATIAL indexes and disable online

index creation for SPATIAL indexes.
parent 9e70d88d
...@@ -7835,10 +7835,7 @@ get_innobase_type_from_mysql_type( ...@@ -7835,10 +7835,7 @@ get_innobase_type_from_mysql_type(
case MYSQL_TYPE_DECIMAL: case MYSQL_TYPE_DECIMAL:
return(DATA_DECIMAL); return(DATA_DECIMAL);
case MYSQL_TYPE_GEOMETRY: case MYSQL_TYPE_GEOMETRY:
return (DATA_BLOB);
/* TODO: MySQL 5.7: Geometry
return(DATA_GEOMETRY); return(DATA_GEOMETRY);
*/
case MYSQL_TYPE_TINY_BLOB: case MYSQL_TYPE_TINY_BLOB:
case MYSQL_TYPE_MEDIUM_BLOB: case MYSQL_TYPE_MEDIUM_BLOB:
case MYSQL_TYPE_BLOB: case MYSQL_TYPE_BLOB:
......
...@@ -967,6 +967,20 @@ ha_innobase::check_if_supported_inplace_alter( ...@@ -967,6 +967,20 @@ ha_innobase::check_if_supported_inplace_alter(
DBUG_ASSERT(!m_prebuilt->table->fts || m_prebuilt->table->fts->doc_col DBUG_ASSERT(!m_prebuilt->table->fts || m_prebuilt->table->fts->doc_col
< dict_table_get_n_user_cols(m_prebuilt->table)); < dict_table_get_n_user_cols(m_prebuilt->table));
/* Spatial indexes should use copy method for now.
TOO: remove this when below ADD_SPATIAL_INDEX supported. */
for (uint i = 0; i < ha_alter_info->index_add_count; i++) {
const KEY* key =
&ha_alter_info->key_info_buffer[
ha_alter_info->index_add_buffer[i]];
if (key->flags & HA_SPATIAL) {
ha_alter_info->unsupported_reason = innobase_get_err_msg(
ER_INNODB_FT_LIMIT);
DBUG_RETURN(HA_ALTER_INPLACE_NOT_SUPPORTED);
}
}
#ifdef MYSQL_SPATIAL_INDEX #ifdef MYSQL_SPATIAL_INDEX
if (ha_alter_info->handler_flags if (ha_alter_info->handler_flags
& Alter_inplace_info::ADD_SPATIAL_INDEX) { & Alter_inplace_info::ADD_SPATIAL_INDEX) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment