[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - connectivity/source

Julien Nabet (via logerrit) logerrit at kemper.freedesktop.org
Mon Nov 9 11:01:22 UTC 2020


 connectivity/source/drivers/firebird/PreparedStatement.cxx |   24 +++++++++++++
 1 file changed, 24 insertions(+)

New commits:
commit a5f5a404caa813a1748df5d2372fb1659fcaf3a9
Author:     Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Sat Nov 7 16:09:31 2020 +0100
Commit:     Michael Stahl <michael.stahl at cib.de>
CommitDate: Mon Nov 9 12:00:39 2020 +0100

    tdf#130596 FIREBIRD error in query input param when referred field is SQL_LONG
    
    In addition, deal too with:
    - SQL_INT64
    - SQL_FLOAT
    - SQL_BOOLEAN
    
    Change-Id: I542fbedcb01f1967a4d5d482cbb2edf7ed3bf757
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105434
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    (cherry picked from commit 344e26ace0a65c23cb1020b5907639fa9a67255e)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105459
    Reviewed-by: Michael Stahl <michael.stahl at cib.de>

diff --git a/connectivity/source/drivers/firebird/PreparedStatement.cxx b/connectivity/source/drivers/firebird/PreparedStatement.cxx
index e86f8cf80982..e4510b758055 100644
--- a/connectivity/source/drivers/firebird/PreparedStatement.cxx
+++ b/connectivity/source/drivers/firebird/PreparedStatement.cxx
@@ -240,6 +240,30 @@ void SAL_CALL OPreparedStatement::setString(sal_Int32 nParameterIndex,
         setShort(nParameterIndex, int32Value);
         break;
     }
+    case SQL_LONG:
+    {
+        sal_Int32 int32Value = sInput.toInt32();
+        setInt(nParameterIndex, int32Value);
+        break;
+    }
+    case SQL_INT64:
+    {
+        sal_Int64 int64Value = sInput.toInt64();
+        setLong(nParameterIndex, int64Value);
+        break;
+    }
+    case SQL_FLOAT:
+    {
+        float floatValue = sInput.toFloat();
+        setFloat(nParameterIndex, floatValue);
+        break;
+    }
+    case SQL_BOOLEAN:
+    {
+        bool boolValue = sInput.toBoolean();
+        setBoolean(nParameterIndex, boolValue);
+        break;
+    }
     default:
         ::dbtools::throwSQLException(
             "Incorrect type for setString",


More information about the Libreoffice-commits mailing list