diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2012-06-01 14:52:46 +0200 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2012-06-01 17:03:01 +0200 |
commit | e7e21a6feae30c29c956235d071ebb0805c5afb2 (patch) | |
tree | fba4fee12200d824c283da3c0aafa631a4a6430c /dbaccess | |
parent | 13b45d774088f55b07388e69f44a98468ea64a06 (diff) |
organise & comment code better
Continuation of commits to fix fdo#48345
Change-Id: Ie28f6a55cd8715a7180f5d88fe23c5b310440744
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/api/KeySet.cxx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx index d94609b6061c..13464c4c870a 100644 --- a/dbaccess/source/core/api/KeySet.cxx +++ b/dbaccess/source/core/api/KeySet.cxx @@ -1106,10 +1106,16 @@ sal_Bool SAL_CALL OKeySet::next( ) throw(SQLException, RuntimeException) if(isAfterLast()) return sal_False; ++m_aKeyIter; - if(!m_bRowCountFinal) // not yet all records fetched + if(!m_bRowCountFinal && m_aKeyIter == m_aKeyMap.end()) { - if(m_aKeyIter == m_aKeyMap.end() && !fetchRow()) + // not yet all records fetched, but we reached the end of those we fetched + // try to fetch one more row + if (!fetchRow()) + { + // nope, we arrived at end of data m_aKeyIter = m_aKeyMap.end(); + OSL_ENSURE(isAfterLast(), "fetchRow failed, but not end of data"); + } } refreshRow(); |