summaryrefslogtreecommitdiff
path: root/libmysqlpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2015-05-02 02:46:37 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2015-05-02 02:46:37 +0100
commit797838a4efa7ef96e98385dc55304ee395694ac4 (patch)
tree7f0900e4b94f474e762e9bef2ac662690392adab /libmysqlpp
parentCentralize all the column reference storage logic (diff)
downloadlibdbpp-mysql-797838a4efa7ef96e98385dc55304ee395694ac4.tar.bz2
libdbpp-mysql-797838a4efa7ef96e98385dc55304ee395694ac4.tar.xz
libdbpp-mysql-797838a4efa7ef96e98385dc55304ee395694ac4.zip
Initialize year/month/day fields time struct
Diffstat (limited to 'libmysqlpp')
-rw-r--r--libmysqlpp/command.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/libmysqlpp/command.cpp b/libmysqlpp/command.cpp
index 04628ec..1b1b4ae 100644
--- a/libmysqlpp/command.cpp
+++ b/libmysqlpp/command.cpp
@@ -135,6 +135,9 @@ MySQL::Command::bindParamT(unsigned int n, const boost::posix_time::time_duratio
binds[n].buffer_type = MYSQL_TYPE_TIME;
binds[n].buffer = realloc(binds[n].buffer, sizeof(MYSQL_TIME));
MYSQL_TIME & ts = *static_cast<MYSQL_TIME*>(binds[n].buffer);
+ ts.year = 0;
+ ts.month = 0;
+ ts.day = 0;
ts.hour = v.hours();
ts.minute = v.minutes();
ts.second = v.seconds();