[Libreoffice-commits] core.git: connectivity/source

Julien Nabet serval2412 at yahoo.fr
Mon Jan 1 20:04:44 UTC 2018


 connectivity/source/drivers/firebird/PreparedStatement.cxx |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit f31ccd18f1b142f8c851e7e219f8bc18b157bc52
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Mon Jan 1 16:59:58 2018 +0100

    Related tdf#104942: implement setByte on firebird
    
    There's no TINYINT or equivalent so let's do the same as setShort
    
    Change-Id: Ia1154ee068b02f40e7efa21571036d8b49844859
    Reviewed-on: https://gerrit.libreoffice.org/47234
    Reviewed-by: Lionel Elie Mamane <lionel at mamane.lu>
    Tested-by: Jenkins <ci at libreoffice.org>

diff --git a/connectivity/source/drivers/firebird/PreparedStatement.cxx b/connectivity/source/drivers/firebird/PreparedStatement.cxx
index e2c56e6dbb29..35cd4579be1a 100644
--- a/connectivity/source/drivers/firebird/PreparedStatement.cxx
+++ b/connectivity/source/drivers/firebird/PreparedStatement.cxx
@@ -16,7 +16,6 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-
 #include "Connection.hxx"
 #include "PreparedStatement.hxx"
 #include "ResultSet.hxx"
@@ -380,9 +379,11 @@ void OPreparedStatement::setValue(sal_Int32 nIndex, const T& nValue, ISC_SHORT n
     memcpy(pVar->sqldata, &nValue, sizeof(nValue));
 }
 
-void SAL_CALL OPreparedStatement::setByte(sal_Int32 /*nIndex*/, sal_Int8 /*nValue*/)
+void SAL_CALL OPreparedStatement::setByte(sal_Int32 nIndex, sal_Int8 nValue)
 {
-    ::dbtools::throwFunctionNotSupportedSQLException("XParameters::setByte", *this);
+    // there's no TINYINT or equivalent on Firebird,
+    // so do the same as setShort
+    setValue< sal_Int16 >(nIndex, nValue, SQL_SHORT);
 }
 
 void SAL_CALL OPreparedStatement::setShort(sal_Int32 nIndex, sal_Int16 nValue)


More information about the Libreoffice-commits mailing list