summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2016-12-04 13:39:47 +0100
committerJulien Nabet <serval2412@yahoo.fr>2016-12-04 21:55:23 +0000
commitd5fc585db2071c57cf9c70f071c8d330ebeca1e4 (patch)
treee3ccacdea50d822db4dc833af4e638cb51884ae6
parent711c871ad2949184f254edae5d03ef900b904f12 (diff)
tdf#104227: fix subtypes DECIMAL/NUMERIC in resultset
bt here: https://bug-attachments.documentfoundation.org/attachment.cgi?id=129298 See also https://bugs.documentfoundation.org/show_bug.cgi?id=104227#c13 for more details Change-Id: Ied497cfff2f71e67161d541b90fe48bb3e2456b9 Reviewed-on: https://gerrit.libreoffice.org/31593 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> (cherry picked from commit 8d2f58a9922ca7352c626db06f9b8d5ca0bbaead) Reviewed-on: https://gerrit.libreoffice.org/31598
-rw-r--r--connectivity/source/drivers/firebird/ResultSet.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/connectivity/source/drivers/firebird/ResultSet.cxx b/connectivity/source/drivers/firebird/ResultSet.cxx
index f48046524364..c19207d33577 100644
--- a/connectivity/source/drivers/firebird/ResultSet.cxx
+++ b/connectivity/source/drivers/firebird/ResultSet.cxx
@@ -455,17 +455,17 @@ ORowSetValue OResultSet::retrieveValue(const sal_Int32 nColumnIndex, const ISC_S
case SQL_VARYING:
return getString(nColumnIndex);
case SQL_SHORT:
- if(nSqlSubType == 0 || nSqlSubType == 1) //numeric or decimal
+ if(nSqlSubType == 1 || nSqlSubType == 2) //numeric or decimal
return getString(nColumnIndex);
return getShort(nColumnIndex);
case SQL_LONG:
- if(nSqlSubType == 0 || nSqlSubType == 1) //numeric or decimal
+ if(nSqlSubType == 1 || nSqlSubType == 2) //numeric or decimal
return getString(nColumnIndex);
return getInt(nColumnIndex);
case SQL_FLOAT:
return getFloat(nColumnIndex);
case SQL_DOUBLE:
- if(nSqlSubType == 0 || nSqlSubType == 1) //numeric or decimal
+ if(nSqlSubType == 1 || nSqlSubType == 2) //numeric or decimal
return getString(nColumnIndex);
return getDouble(nColumnIndex);
case SQL_D_FLOAT:
@@ -477,7 +477,7 @@ ORowSetValue OResultSet::retrieveValue(const sal_Int32 nColumnIndex, const ISC_S
case SQL_TYPE_DATE:
return getDate(nColumnIndex);
case SQL_INT64:
- if(nSqlSubType == 0 || nSqlSubType == 1) //numeric or decimal
+ if(nSqlSubType == 1 || nSqlSubType == 2) //numeric or decimal
return getString(nColumnIndex);
return getLong(nColumnIndex);
case SQL_BLOB: