summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2012-12-05 18:09:57 +0100
committerLionel Elie Mamane <lionel@mamane.lu>2012-12-06 19:42:47 +0100
commit59375da788af698aa619cb763adaf0428a4bb81e (patch)
tree207ebdae7debcc0550b3af06cfb8f95a350d9e9f /dbaccess
parent570cb8ffd4e174aa936f15217fd4dbe163c44e6a (diff)
fdo#53281 Don't cache whole row in KeySet
This was done for the sake of ODBC, but the cost was imposed on all backends. The ODBC problems are now solved cleanly (and more efficiently) in the SDBC<->ODBC layer. Change-Id: Ib8a864da08deaaacc96a379fb72b3b7cbb34598c
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/core/api/KeySet.cxx16
1 files changed, 1 insertions, 15 deletions
diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx
index 057ebc0c395e..21b897bd8899 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -38,7 +38,6 @@
#include <com/sun/star/sdbcx/KeyType.hpp>
#include <connectivity/dbtools.hxx>
#include <connectivity/dbexception.hxx>
-#include <boost/static_assert.hpp>
#include <list>
#include <algorithm>
#include <string.h>
@@ -1432,23 +1431,10 @@ sal_Bool OKeySet::fetchRow()
bRet = m_xDriverSet->next();
if ( bRet )
{
- const int cc = m_xSetMetaData->getColumnCount();
-
ORowSetRow aKeyRow = new connectivity::ORowVector< ORowSetValue >((*m_pKeyColumnNames).size() + m_pForeignColumnNames->size());
- ORowSetRow aFullRow = new connectivity::ORowVector< ORowSetValue >(cc);
-
- // Fetch the columns only once and in order, to satisfy restrictive backends such as ODBC
- connectivity::ORowVector< ORowSetValue >::Vector::iterator aFRIter = aFullRow->get().begin();
- // Column 0 is reserved for the bookmark; unused here.
- ++aFRIter;
- BOOST_STATIC_ASSERT(sizeof(int) >= sizeof(sal_Int32)); // "At least a 32 bit word expected"
- for (int i = 1; i <= cc; ++i, ++aFRIter )
- {
- aFRIter->fill(i, m_xSetMetaData->getColumnType(i), m_xDriverRow);
- }
::comphelper::disposeComponent(m_xSet);
- m_xRow.set(new OPrivateRow(aFullRow->get()));
+ m_xRow.set(m_xDriverRow, UNO_QUERY_THROW);
connectivity::ORowVector< ORowSetValue >::Vector::iterator aIter = aKeyRow->get().begin();
// copy key columns