diff options
author | Andrzej J.R. Hunt <andrzej@ahunt.org> | 2013-07-31 15:40:39 +0200 |
---|---|---|
committer | Andrzej J.R. Hunt <andrzej@ahunt.org> | 2013-07-31 16:06:58 +0200 |
commit | 289741da6d5f1e7130f27e62b7ec4819da849d22 (patch) | |
tree | 1f01acdbcb35810f2b6932a286f6ee9fa274b17a /connectivity | |
parent | a55178ee66d1920a9bd9e7dda3d599a4b86f328a (diff) |
Optimise getPrimaryKeys a bit. (firebird-sdbc)
Change-Id: I93d0a460b8c855596969a16fc33b31f9e0065624
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/drivers/firebird/FDatabaseMetaData.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/connectivity/source/drivers/firebird/FDatabaseMetaData.cxx b/connectivity/source/drivers/firebird/FDatabaseMetaData.cxx index d5478f7f454e..bf7fadc7ab23 100644 --- a/connectivity/source/drivers/firebird/FDatabaseMetaData.cxx +++ b/connectivity/source/drivers/firebird/FDatabaseMetaData.cxx @@ -1492,7 +1492,10 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getPrimaryKeys( while(xRs->next()) { // 3. Table Name - aCurrentRow[3] = new ORowSetValueDecorator(xRow->getString(1)); + if (xRs->getRow() == 1) // Table name doesn't change, so only retrieve once + { + aCurrentRow[3] = new ORowSetValueDecorator(xRow->getString(1)); + } // 4. Column Name aCurrentRow[4] = new ORowSetValueDecorator(xRow->getString(2)); // 5. KEY_SEQ (which key in the sequence) |