From ab5046438ca91ed7659e3f2bcc13235bc311ad32 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/qt/date-time/mysql/qdate-time-traits.hxx | 4 ++++ odb/qt/date-time/mysql/qdate-traits.hxx | 5 +++++ odb/qt/date-time/mysql/qtime-traits.hxx | 4 ++++ 3 files changed, 13 insertions(+) diff --git a/odb/qt/date-time/mysql/qdate-time-traits.hxx b/odb/qt/date-time/mysql/qdate-time-traits.hxx index ac4c1a6..c3be3e1 100644 --- a/odb/qt/date-time/mysql/qdate-time-traits.hxx +++ b/odb/qt/date-time/mysql/qdate-time-traits.hxx @@ -61,6 +61,8 @@ namespace odb i.hour = static_cast (t.hour ()); i.minute = static_cast (t.minute ()); i.second = static_cast (t.second ()); + + i.second_part = 0; } } }; @@ -111,6 +113,8 @@ namespace odb i.hour = static_cast (t.hour ()); i.minute = static_cast (t.minute ()); i.second = static_cast (t.second ()); + + i.second_part = 0; } } }; diff --git a/odb/qt/date-time/mysql/qdate-traits.hxx b/odb/qt/date-time/mysql/qdate-traits.hxx index d3dc1f1..e41cc03 100644 --- a/odb/qt/date-time/mysql/qdate-traits.hxx +++ b/odb/qt/date-time/mysql/qdate-traits.hxx @@ -52,6 +52,11 @@ namespace odb i.year = static_cast (v.year ()); i.month = static_cast (v.month ()); i.day = static_cast (v.day ()); + + i.hour = 0; + i.minute = 0; + i.second = 0; + i.second_part = 0; } } }; diff --git a/odb/qt/date-time/mysql/qtime-traits.hxx b/odb/qt/date-time/mysql/qtime-traits.hxx index b7cf84b..a6daf24 100644 --- a/odb/qt/date-time/mysql/qtime-traits.hxx +++ b/odb/qt/date-time/mysql/qtime-traits.hxx @@ -47,11 +47,15 @@ namespace odb is_null = false; i.neg = false; + i.year = 0; + i.month = 0; i.day = 0; i.hour = static_cast (v.hour ()); i.minute = static_cast (v.minute ()); i.second = static_cast (v.second ()); + + i.second_part = 0; } } }; -- cgit v1.1