[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - connectivity/source
Julien Nabet (via logerrit)
logerrit at kemper.freedesktop.org
Mon Sep 23 08:00:10 UTC 2019
connectivity/source/drivers/firebird/PreparedStatement.cxx | 14 +++++++++++++
1 file changed, 14 insertions(+)
New commits:
commit 3a70b4a1be0e790579cc15e9917bd575de8d5315
Author: Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Sat Sep 21 15:22:16 2019 +0200
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Sep 23 09:59:32 2019 +0200
tdf#127657: FIREBIRD error in query input param when referred field is integer
Change-Id: I626c8a8869570986d0293cd9070a1ee40ec585dc
Reviewed-on: https://gerrit.libreoffice.org/79314
Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
(cherry picked from commit f23e19cd15f14566832befba73fb6bbc1cffb0d7)
Reviewed-on: https://gerrit.libreoffice.org/79372
Tested-by: Jenkins
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 71a43454f315..4586cc4a3ba4 100644
--- a/connectivity/source/drivers/firebird/PreparedStatement.cxx
+++ b/connectivity/source/drivers/firebird/PreparedStatement.cxx
@@ -229,6 +229,20 @@ void SAL_CALL OPreparedStatement::setString(sal_Int32 nParameterIndex,
assert( pVar->sqlsubtype == static_cast<short>(BlobSubtype::Clob) );
setClob(nParameterIndex, sInput );
break;
+ case SQL_SHORT:
+ {
+ sal_Int32 int32Value = sInput.toInt32();
+ if ( (int32Value < std::numeric_limits<sal_Int16>::min()) ||
+ (int32Value > std::numeric_limits<sal_Int16>::max()) )
+ {
+ ::dbtools::throwSQLException(
+ "Value out of range for SQL_SHORT type",
+ ::dbtools::StandardSQLState::INVALID_SQL_DATA_TYPE,
+ *this);
+ }
+ setShort(nParameterIndex, int32Value);
+ break;
+ }
default:
::dbtools::throwSQLException(
"Incorrect type for setString",
More information about the Libreoffice-commits
mailing list