1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-19923 Add type handlers for geometry sub-types

This commit is contained in:
Alexander Barkov
2019-07-03 13:05:15 +04:00
parent c1519d62d0
commit b511202335
28 changed files with 1262 additions and 889 deletions

View File

@ -129,6 +129,28 @@ bool Key_part_spec::operator==(const Key_part_spec& other) const
&other.field_name);
}
bool Key_part_spec::check_key_for_blob(const handler *file) const
{
if (!(file->ha_table_flags() & HA_CAN_INDEX_BLOBS))
{
my_error(ER_BLOB_USED_AS_KEY, MYF(0), field_name.str, file->table_type());
return true;
}
return false;
}
bool Key_part_spec::init_multiple_key_for_blob(const handler *file)
{
if (check_key_for_blob(file))
return true;
if (!length)
length= file->max_key_length() + 1;
return false;
}
/**
Construct an (almost) deep copy of this key. Only those
elements that are known to never change are not copied.