From 23419030f7fa4cc96d0a086a6af87e7ef2e2ed18 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 7 Feb 2013 14:35:53 +0200 Subject: Initialize second_part which apparently is used by MariaDB --- odb/boost/date-time/mysql/gregorian-traits.hxx | 5 +++++ odb/boost/date-time/mysql/posix-time-traits.hxx | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/odb/boost/date-time/mysql/gregorian-traits.hxx b/odb/boost/date-time/mysql/gregorian-traits.hxx index 0bbcb15..939fd29 100644 --- a/odb/boost/date-time/mysql/gregorian-traits.hxx +++ b/odb/boost/date-time/mysql/gregorian-traits.hxx @@ -51,6 +51,11 @@ namespace odb i.year = v.year (); i.month = v.month (); i.day = v.day (); + + i.hour = 0; + i.minute = 0; + i.second = 0; + i.second_part = 0; } } }; diff --git a/odb/boost/date-time/mysql/posix-time-traits.hxx b/odb/boost/date-time/mysql/posix-time-traits.hxx index 519dc83..9810aa5 100644 --- a/odb/boost/date-time/mysql/posix-time-traits.hxx +++ b/odb/boost/date-time/mysql/posix-time-traits.hxx @@ -63,6 +63,8 @@ namespace odb i.hour = t.hours (); i.minute = t.minutes (); i.second = t.seconds (); + + i.second_part = 0; } } }; @@ -116,6 +118,8 @@ namespace odb i.hour = t.hours (); i.minute = t.minutes (); i.second = t.seconds (); + + i.second_part = 0; } } }; @@ -160,10 +164,16 @@ namespace odb { is_null = false; i.neg = v.is_negative (); + + i.year = 0; + i.month = 0; i.day = 0; + i.hour = std::abs (v.hours ()); i.minute = std::abs (v.minutes ()); i.second = std::abs (v.seconds ()); + + i.second_part = 0; } } }; -- cgit v1.1