From ea61a62323fe398d682da5bbf5b0d9e17d442212 Mon Sep 17 00:00:00 2001 From: Wastack Date: Tue, 29 Nov 2016 10:10:30 +0100 Subject: [PATCH] tdf#104227 query boolean like infos correctly Change-Id: Ic862bb1ce3efa61d6a01fc56fb9e84cf98bb7cd0 Reviewed-on: https://gerrit.libreoffice.org/31355 Reviewed-by: Lionel Elie Mamane Tested-by: Lionel Elie Mamane --- connectivity/source/drivers/firebird/DatabaseMetaData.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx index 4c2e3934e735..959b134a0505 100644 --- a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx +++ b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx @@ -1124,7 +1124,8 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumnPrivileges( aCurrentRow[5] = new ORowSetValueDecorator(xRow->getString(2)); // 5. GRANTOR aCurrentRow[6] = new ORowSetValueDecorator(xRow->getString(3)); // 6. GRANTEE aCurrentRow[7] = new ORowSetValueDecorator(xRow->getString(4)); // 7. Privilege - aCurrentRow[7] = new ORowSetValueDecorator(xRow->getBoolean(5)); // 8. Grantable + aCurrentRow[7] = new ORowSetValueDecorator( ( xRow->getShort(5) == 1 ) ? + OUString("YES") : OUString("NO")); // 8. Grantable aResults.push_back(aCurrentRow); } @@ -1721,7 +1722,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getIndexInfo( } // 4. NON_UNIQUE -- i.e. specifically negate here. - aCurrentRow[4] = new ORowSetValueDecorator(!xRow->getBoolean(5)); + aCurrentRow[4] = new ORowSetValueDecorator(xRow->getShort(5) == 0); // 6. INDEX NAME aCurrentRow[6] = new ORowSetValueDecorator(sanitizeIdentifier(xRow->getString(4)));