[Libreoffice-commits] core.git: connectivity/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Sep 13 18:37:00 UTC 2018
connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit f4393330b2bbebc7290b72ad2f5b81d26244ac64
Author: Tamas Bunth <tamas.bunth at collabora.co.uk>
AuthorDate: Wed Sep 12 18:08:49 2018 +0200
Commit: Tamás Bunth <btomi96 at gmail.com>
CommitDate: Thu Sep 13 20:36:31 2018 +0200
mysqlc: fix XPreparedStatement::setTimestamp
Change-Id: Ia0d0290517fdebd9a7700d52fa0e86de0e958b2d
Reviewed-on: https://gerrit.libreoffice.org/60406
Tested-by: Jenkins
Reviewed-by: Tamás Bunth <btomi96 at gmail.com>
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx b/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx
index 1aa1a337b3b7..b4a2844ce6f4 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx
@@ -298,6 +298,7 @@ void SAL_CALL OPreparedStatement::setTimestamp(sal_Int32 parameter, const DateTi
checkParameterIndex(parameter);
MYSQL_TIME my_time;
+ memset(&my_time, 0, sizeof(MYSQL_TIME));
my_time.hour = aVal.Hours;
my_time.minute = aVal.Minutes;
@@ -307,7 +308,7 @@ void SAL_CALL OPreparedStatement::setTimestamp(sal_Int32 parameter, const DateTi
my_time.day = aVal.Day;
const sal_Int32 nIndex = parameter - 1;
- m_binds[nIndex].buffer_type = MYSQL_TYPE_TIME;
+ m_binds[nIndex].buffer_type = MYSQL_TYPE_DATETIME;
mysqlc_sdbc_driver::resetSqlVar(&m_binds[nIndex].buffer, &my_time, MYSQL_TYPE_DATETIME);
m_bindMetas[nIndex].is_null = 0;
}
More information about the Libreoffice-commits
mailing list