[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - connectivity/source
Lionel Elie Mamane
lionel at mamane.lu
Thu Dec 24 12:59:18 PST 2015
connectivity/source/drivers/firebird/PreparedStatement.cxx | 10 ++++----
connectivity/source/drivers/firebird/Util.cxx | 16 ++++---------
2 files changed, 10 insertions(+), 16 deletions(-)
New commits:
commit 93c15f226cfd424682178883b0a525707d5303ea
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date: Fri Dec 18 16:54:00 2015 +0100
tdf#96572 firebird correctly transmit request for NULL
even if column is not nullable
Conflicts:
connectivity/source/drivers/firebird/Util.cxx
Change-Id: I72ceda68e983125aef26c8f0aacc06320bd16b77
Reviewed-on: https://gerrit.libreoffice.org/20793
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/connectivity/source/drivers/firebird/PreparedStatement.cxx b/connectivity/source/drivers/firebird/PreparedStatement.cxx
index 3a78378..e4548a4 100644
--- a/connectivity/source/drivers/firebird/PreparedStatement.cxx
+++ b/connectivity/source/drivers/firebird/PreparedStatement.cxx
@@ -706,13 +706,13 @@ void OPreparedStatement::setParameterNull(sal_Int32 nParameterIndex,
bool bSetNull)
{
XSQLVAR* pVar = m_pInSqlda->sqlvar + (nParameterIndex - 1);
- if (pVar->sqltype & 1)
+ if (bSetNull)
{
- if (bSetNull)
- *pVar->sqlind = -1;
- else
- *pVar->sqlind = 0;
+ pVar->sqltype |= 1;
+ *pVar->sqlind = -1;
}
+ else
+ *pVar->sqlind = 0;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/firebird/Util.cxx b/connectivity/source/drivers/firebird/Util.cxx
index c8f182d..263d1cf 100644
--- a/connectivity/source/drivers/firebird/Util.cxx
+++ b/connectivity/source/drivers/firebird/Util.cxx
@@ -254,11 +254,8 @@ void firebird::mallocSQLVAR(XSQLDA* pSqlda)
assert(false);
break;
}
- if (pVar->sqltype & 1)
- {
- /* allocate variable to hold NULL status */
- pVar->sqlind = static_cast<short *>(malloc(sizeof(short)));
- }
+ /* allocate variable to hold NULL status */
+ pVar->sqlind = static_cast<short *>(malloc(sizeof(short)));
}
}
@@ -302,13 +299,10 @@ void firebird::freeSQLVAR(XSQLDA* pSqlda)
break;
}
- if (pVar->sqltype & 1)
+ if(pVar->sqlind)
{
- if(pVar->sqlind)
- {
- free(pVar->sqlind);
- pVar->sqlind = NULL;
- }
+ free(pVar->sqlind);
+ pVar->sqlind = NULL;
}
}
}
More information about the Libreoffice-commits
mailing list