summaryrefslogtreecommitdiff
path: root/sql/field.h
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2011-03-09 09:20:23 +0100
committerSergei Golubchik <sergii@pisem.net>2011-03-09 09:20:23 +0100
commiteeb7f5129b7e404b1612f1a39c243f3678c89117 (patch)
treeb304ae8f481cf61d1629830c3f63702a084728cb /sql/field.h
parent743b6f866b3fdc7a40e5b3e81228be61353aeba6 (diff)
downloadmariadb-git-eeb7f5129b7e404b1612f1a39c243f3678c89117.tar.gz
lp:731089 Crash in Field_time_hires::pack_length on CREATE TABLE TIME(3)
add missing size_of() methods to new Field* classes
Diffstat (limited to 'sql/field.h')
-rw-r--r--sql/field.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/field.h b/sql/field.h
index c955981531a..dc24bc3be3d 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -1255,6 +1255,7 @@ public:
const uchar *unpack(uchar* to, const uchar *from, uint param_data,
bool low_byte_first)
{ return Field::unpack(to, from, param_data, low_byte_first); }
+ uint size_of() const { return sizeof(*this); }
};
@@ -1419,6 +1420,7 @@ public:
uint32 pack_length() const;
void sql_type(String &str) const;
void make_field(Send_field *);
+ uint size_of() const { return sizeof(*this); }
};
class Field_datetime :public Field_temporal {
@@ -1494,6 +1496,7 @@ public:
const uchar *unpack(uchar* to, const uchar *from, uint param_data,
bool low_byte_first)
{ return Field::unpack(to, from, param_data, low_byte_first); }
+ uint size_of() const { return sizeof(*this); }
};
static inline Field_timestamp *