Fixing compilation failure on Windows: moving references to type_handler_xxx from field.h to field.cc

This commit is contained in:
Alexander Barkov 2017-04-26 10:52:18 +04:00
parent 852f2305b9
commit b445c1ebb5
2 changed files with 17 additions and 9 deletions

View file

@ -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;

View file

@ -3238,15 +3238,7 @@ public:
: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
{