mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-27 19:10:20 +01:00
When we call statement execution for "PRAGMA incremental_vacuum(1024);" it fails with null std iterator exception. It happens because variable "extracts" is empty and construction "*extracts.begin()" is invalid.
This commit is contained in:
@@ -273,7 +273,16 @@ std::size_t SQLiteStatementImpl::next()
|
|||||||
}
|
}
|
||||||
_stepCalled = false;
|
_stepCalled = false;
|
||||||
if (_affectedRowCount == POCO_SQLITE_INV_ROW_CNT) _affectedRowCount = 0;
|
if (_affectedRowCount == POCO_SQLITE_INV_ROW_CNT) _affectedRowCount = 0;
|
||||||
_affectedRowCount += (*extracts.begin())->numOfRowsHandled();
|
|
||||||
|
//_affectedRowCount += (*extracts.begin())->numOfRowsHandled();
|
||||||
|
if (extracts.size())
|
||||||
|
_affectedRowCount += (*extracts.begin())->numOfRowsHandled();
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_stepCalled = true;
|
||||||
|
_nextResponse = SQLITE_DONE;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (SQLITE_DONE == _nextResponse)
|
else if (SQLITE_DONE == _nextResponse)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user