diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2019-11-26 18:45:52 +0100 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2019-11-26 22:20:45 +0100 |
commit | 97ad402d58b52a1f2636905137c21298531c2935 (patch) | |
tree | c5550433892ccd33cfa786edc8924a2f2f31efdf /connectivity/source | |
parent | c32dedb3a6b44c6f9e5badb656883792adbcb0a2 (diff) |
tdf#128698: MySQL/MariaDB direct Connection: time-values not written to table
Initialize MYSQL_TIME my_time structure before using it
Same idea as part of f4393330b2bbebc7290b72ad2f5b81d26244ac64
but by using modern initialization instead of memset
Change-Id: Ife9741604e7bf8f0fbe4671ddb16a56204f4fa43
Reviewed-on: https://gerrit.libreoffice.org/83811
Tested-by: Jenkins
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
Diffstat (limited to 'connectivity/source')
-rw-r--r-- | connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx b/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx index 902a1d93edb0..7cdd19667f30 100644 --- a/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx +++ b/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx @@ -267,7 +267,7 @@ void SAL_CALL OPreparedStatement::setTime(sal_Int32 parameter, const Time& aVal) checkDisposed(OPreparedStatement::rBHelper.bDisposed); checkParameterIndex(parameter); - MYSQL_TIME my_time; + MYSQL_TIME my_time = {}; my_time.hour = aVal.Hours; my_time.minute = aVal.Minutes; |