Commit b445c1eb authored by Alexander Barkov's avatar Alexander Barkov

Fixing compilation failure on Windows: moving references to type_handler_xxx...

Fixing compilation failure on Windows: moving references to type_handler_xxx from field.h to field.cc
parent 852f2305
......@@ -8176,6 +8176,22 @@ void Field_blob::sort_string(uchar *to,uint length)
}
/*
Return the data type handler, according to packlength.
Implemented in field.cc rather than in field.h
to avoid exporting type_handler_xxx with MYSQL_PLUGIN_IMPORT.
*/
const Type_handler *Field_blob::type_handler() const
{
switch (packlength) {
case 1: return &type_handler_tiny_blob;
case 2: return &type_handler_blob;
case 3: return &type_handler_medium_blob;
}
return &type_handler_long_blob;
}
void Field_blob::sql_type(String &res) const
{
const char *str;
......
......@@ -3238,15 +3238,7 @@ class Field_blob :public Field_longstr {
:Field_longstr((uchar*) 0, 0, (uchar*) "", 0, NONE, &temp_lex_str,
system_charset_info),
packlength(packlength_arg) {}
const Type_handler *type_handler() const
{
switch (packlength) {
case 1: return &type_handler_tiny_blob;
case 2: return &type_handler_blob;
case 3: return &type_handler_medium_blob;
}
return &type_handler_long_blob;
}
const Type_handler *type_handler() const;
/* Note that the default copy constructor is used, in clone() */
enum_field_types type() const
{
......
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