aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2013-02-07 14:35:53 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2013-02-07 14:35:53 +0200
commitab5046438ca91ed7659e3f2bcc13235bc311ad32 (patch)
tree499446404ca1c54c7b427e50637ccffa4f3bef3f
parent5c0f8c04b7f89b05873007c9940bad48ddb98e78 (diff)
Initialize second_part which apparently is used by MariaDB
-rw-r--r--odb/qt/date-time/mysql/qdate-time-traits.hxx4
-rw-r--r--odb/qt/date-time/mysql/qdate-traits.hxx5
-rw-r--r--odb/qt/date-time/mysql/qtime-traits.hxx4
3 files changed, 13 insertions, 0 deletions
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<unsigned int> (t.hour ());
i.minute = static_cast<unsigned int> (t.minute ());
i.second = static_cast<unsigned int> (t.second ());
+
+ i.second_part = 0;
}
}
};
@@ -111,6 +113,8 @@ namespace odb
i.hour = static_cast<unsigned int> (t.hour ());
i.minute = static_cast<unsigned int> (t.minute ());
i.second = static_cast<unsigned int> (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<unsigned int> (v.year ());
i.month = static_cast<unsigned int> (v.month ());
i.day = static_cast<unsigned int> (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<unsigned int> (v.hour ());
i.minute = static_cast<unsigned int> (v.minute ());
i.second = static_cast<unsigned int> (v.second ());
+
+ i.second_part = 0;
}
}
};