Kaydet (Commit) cdadb1b4 authored tarafından Lionel Elie Mamane's avatar Lionel Elie Mamane

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
üst 363c1ede
...@@ -1441,11 +1441,12 @@ sal_Bool OKeySet::fetchRow() ...@@ -1441,11 +1441,12 @@ sal_Bool OKeySet::fetchRow()
bRet = m_xDriverSet->next(); bRet = m_xDriverSet->next();
if ( bRet ) if ( bRet )
{ {
const int cc = m_xSetMetaData->getColumnCount();
ORowSetRow aKeyRow = new connectivity::ORowVector< ORowSetValue >((*m_pKeyColumnNames).size() + m_pForeignColumnNames->size()); 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 // 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(); connectivity::ORowVector< ORowSetValue >::Vector::iterator aFRIter = aFullRow->get().begin();
// Column 0 is reserved for the bookmark; unused here. // Column 0 is reserved for the bookmark; unused here.
++aFRIter; ++aFRIter;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment