connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit f4393330b2bbebc7290b72ad2f5b81d26244ac64 Author: Tamas Bunth <[email protected]> AuthorDate: Wed Sep 12 18:08:49 2018 +0200 Commit: Tamás Bunth <[email protected]> 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 <[email protected]> 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; } _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
