Commit 7b5bfa53 authored by Alexander Barkov's avatar Alexander Barkov

A cleanup for MDEV-19923 Add type handlers for geometry sub-types

Sources did not compile in some builds because of undeclared
ER_BLOB_KEY_WITHOUT_LENGTH. Moving the implementations of
Key_part_spec::check_key_length_for_blob() from sql_class.h to sql_class.cc
parent b5112023
......@@ -141,6 +141,17 @@ bool Key_part_spec::check_key_for_blob(const handler *file) const
}
bool Key_part_spec::check_key_length_for_blob() const
{
if (!length)
{
my_error(ER_BLOB_KEY_WITHOUT_LENGTH, MYF(0), field_name.str);
return true;
}
return false;
}
bool Key_part_spec::init_multiple_key_for_blob(const handler *file)
{
if (check_key_for_blob(file))
......
......@@ -290,15 +290,7 @@ class Key_part_spec :public Sql_alloc {
Key_part_spec *clone(MEM_ROOT *mem_root) const
{ return new (mem_root) Key_part_spec(*this); }
bool check_key_for_blob(const class handler *file) const;
bool check_key_length_for_blob() const
{
if (!length)
{
my_error(ER_BLOB_KEY_WITHOUT_LENGTH, MYF(0), field_name.str);
return true;
}
return false;
}
bool check_key_length_for_blob() const;
bool check_primary_key_for_blob(const class handler *file) const
{
return check_key_for_blob(file) || check_key_length_for_blob();
......
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