summaryrefslogtreecommitdiff
path: root/sql/field.cc
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2017-04-26 10:52:18 +0400
committerAlexander Barkov <bar@mariadb.org>2017-04-26 10:52:18 +0400
commitb445c1ebb5d7012b3994b37a6a9a58c6585040af (patch)
tree99b67407aa1bb6716b430c06719089204f9aa4ed /sql/field.cc
parent852f2305b972d6b7e0160d1c6454807d346048b7 (diff)
downloadmariadb-git-b445c1ebb5d7012b3994b37a6a9a58c6585040af.tar.gz
Fixing compilation failure on Windows: moving references to type_handler_xxx from field.h to field.cc
Diffstat (limited to 'sql/field.cc')
-rw-r--r--sql/field.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/sql/field.cc b/sql/field.cc
index 13bef70e7b8..fa3104f69fe 100644
--- a/sql/field.cc
+++ b/sql/field.cc
@@ -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;