Kaydet (Commit) 062401fe authored tarafından Caolán McNamara's avatar Caolán McNamara

queryComplete is always true

Change-Id: I455fc328a0b9aa3af3e37e9a9fa86ecba97dc5a4
Reviewed-on: https://gerrit.libreoffice.org/62099
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 3ffc8213
......@@ -127,15 +127,6 @@ sal_Int32 MQueryHelper::getResultCount() const
bool MQueryHelper::checkRowAvailable( sal_Int32 nDBRow )
{
/*
while (!queryComplete() && getResultCount() <= (sal_uInt32)nDBRow)
{
if ( !m_aQueryHelper->waitForRow( nDBRow ) ) {
m_aError = m_aQueryHelper->getError();
return sal_False;
}
}
*/
return getResultCount() > nDBRow;
}
......
......@@ -167,7 +167,6 @@ namespace connectivity
void reset();
MQueryHelperResultEntry* getByIndex( sal_uInt32 nRow );
static bool queryComplete() { return true; }
sal_Int32 getResultCount() const;
bool checkRowAvailable( sal_Int32 nDBRow );
bool getRowValue( ORowSetValue& rValue, sal_Int32 nDBRow,const OUString& aDBColumnName, sal_Int32 nType );
......
......@@ -384,8 +384,7 @@ sal_Bool SAL_CALL OResultSet::isAfterLast( )
SAL_WARN("connectivity.mork", "OResultSet::isAfterLast() NOT IMPLEMENTED!");
ResultSetEntryGuard aGuard( *this );
// return sal_True;
return m_nRowPos > currentRowCount() && MQueryHelper::queryComplete();
return m_nRowPos > currentRowCount();
}
sal_Bool SAL_CALL OResultSet::isFirst( )
......@@ -401,7 +400,7 @@ sal_Bool SAL_CALL OResultSet::isLast( )
ResultSetEntryGuard aGuard( *this );
// return sal_True;
return m_nRowPos == currentRowCount() && MQueryHelper::queryComplete();
return m_nRowPos == currentRowCount();
}
void SAL_CALL OResultSet::beforeFirst( )
......@@ -1124,8 +1123,6 @@ void OResultSet::executeQuery()
// query to the mozilla addressbooks has returned all
// values.
OSL_ENSURE( MQueryHelper::queryComplete(), "Query not complete!!");
OSortIndex aSortIndex(eKeyType,m_aOrderbyAscending);
#if OSL_DEBUG_LEVEL > 0
......@@ -1305,25 +1302,8 @@ bool OResultSet::validRow( sal_uInt32 nRow)
{
sal_Int32 nNumberOfRecords = m_aQueryHelper.getResultCount();
while ( nRow > static_cast<sal_uInt32>(nNumberOfRecords) && !MQueryHelper::queryComplete() ) {
if (!m_aQueryHelper.checkRowAvailable( nRow ))
{
SAL_INFO(
"connectivity.mork",
"validRow(" << nRow << "): return False");
return false;
}
if ( m_aQueryHelper.hadError() )
{
m_pStatement->getOwnConnection()->throwSQLException( m_aQueryHelper.getError(), *this );
}
nNumberOfRecords = m_aQueryHelper.getResultCount();
}
if (( nRow == 0 ) ||
( nRow > static_cast<sal_uInt32>(nNumberOfRecords) && MQueryHelper::queryComplete()) ){
( nRow > static_cast<sal_uInt32>(nNumberOfRecords)) ){
SAL_INFO("connectivity.mork", "validRow(" << nRow << "): return False");
return false;
}
......
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