Kaydet (Commit) 8bd58609 authored tarafından Tamas Bunth's avatar Tamas Bunth Kaydeden (comit) Andras Timar

mysqlc: fix XPreparedStatement::setTimestamp

Change-Id: Ia0d0290517fdebd9a7700d52fa0e86de0e958b2d
Reviewed-on: https://gerrit.libreoffice.org/60406
Tested-by: Jenkins
Reviewed-by: 's avatarTamás Bunth <btomi96@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/60462Reviewed-by: 's avatarAndras Timar <andras.timar@collabora.com>
Tested-by: 's avatarAndras Timar <andras.timar@collabora.com>
üst 0184d388
......@@ -301,6 +301,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;
......@@ -310,7 +311,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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment