summaryrefslogtreecommitdiff
path: root/sql/field.cc
diff options
context:
space:
mode:
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 812c4dbb639..cb91e93ec5e 100644
--- a/sql/field.cc
+++ b/sql/field.cc
@@ -5423,6 +5423,22 @@ void Field_timestampf::store_TIME(my_time_t timestamp, ulong sec_part)
my_timestamp_to_binary(&tm, ptr, dec);
}
+bool Field_timestampf::set_max_timestamp()
+{
+ DBUG_ENTER("Field_timestampf::set_max_timestamp");
+
+ mi_int4store(ptr, 0x7fffffff);
+ memset(ptr + 4, 0x0, value_length() - 4);
+
+ DBUG_RETURN(FALSE);
+}
+
+bool Field_timestampf::is_max_timestamp()
+{
+ DBUG_ENTER("Field_timestampf::is_max_timestamp");
+
+ DBUG_RETURN(mi_sint4korr(ptr) == 0x7fffffff);
+}
my_time_t Field_timestampf::get_timestamp(const uchar *pos,
ulong *sec_part) const