summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2012-08-31 18:14:59 +0200
committerMichael Meeks <michael.meeks@suse.com>2012-09-10 11:14:17 +0100
commit613c7a22a850a890a358d39cae43e97f31f516a5 (patch)
tree93e5ff5a7f1b9d7fb627c23a71d39fb65a84e283
parent76876f51796cb10e3b4fbaa7cfaa209ab6b9fd2f (diff)
fdo#53557: use metadata's idea of column count to allocate a row
m_pColumnNames contains only the columns that come straight from a table, not calculated columns Change-Id: I2706790e8c1447d1c4e144bbdef773deeca3e2e8 Reviewed-on: https://gerrit.libreoffice.org/522 Reviewed-by: Michael Meeks <michael.meeks@suse.com> Tested-by: Michael Meeks <michael.meeks@suse.com> Signed-off-by: Michael Meeks <michael.meeks@suse.com>
-rw-r--r--dbaccess/source/core/api/KeySet.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx
index baed229ce61b..5b300ae754ec 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -1434,11 +1434,12 @@ 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 >(m_pColumnNames->size());
+ ORowSetRow aFullRow = new connectivity::ORowVector< ORowSetValue >(cc);
// Fetch the columns only once and in order, to satisfy restrictive backends such as ODBC
- const int cc = m_xSetMetaData->getColumnCount();
connectivity::ORowVector< ORowSetValue >::Vector::iterator aFRIter = aFullRow->get().begin();
// Column 0 is reserved for the bookmark; unused here.
++aFRIter;