* fix(Foundation): tsan warnings fixes

* fix(Thread_POSIX): tsan warnings fixes; add tsan.suppress

* fix(Util): tsan fixes

* fix(netSSL_OpenSSL): tsan fixes

* fix(Data): tsan warnings fixes

* feat(ci): add tsan job

* feat(ci): add tsan job, another attempt

* feat(ci): add tsan job, 3rd attempt

* fix(Foundation): tsan warnings fixes

* fix(Thread_POSIX): tsan warnings fixes; add tsan.suppress

* fix(Util): tsan fixes

* fix(netSSL_OpenSSL): tsan fixes

* fix(Data): tsan warnings fixes

* feat(ci): add tsan job

* feat(ci): add tsan job, another attempt

* feat(ci): add tsan job, 3rd attempt

* fix(ResultMetadata): memory leak #3474

* feat(ci): disable ActiveDispatcher tests for tsan runs

* feat(ci): try to fix tsan options file detection (again)

* chore(TestLibrary: correct spelling

* fix(ci): fix tsan run; add -y to apt; disable samples build for some jobs

* fix(ci): add mysql ports

* feat(ci): add VS asan

* feat(double-conversion): Upgrade double-conversion to v3.2.0 #3624

* chore(asan): disable msvc asan build (dll not found)

* chore(double-conversion): move NumericString.h before double-conversion includes to prevent min/max collision; reinstate lost loongarch64

* chore(JSON): sync pdjson with upstream

* fix(Statement): Poco::Data::Statement becomes unusable after exception #2287
This commit is contained in:
Aleksandar Fabijanic
2022-06-01 23:47:26 -05:00
committed by GitHub
parent 17fec1b985
commit ff879f5905
55 changed files with 2331 additions and 1759 deletions

View File

@@ -69,34 +69,40 @@ StatementImpl::~StatementImpl()
std::size_t StatementImpl::execute(const bool& reset)
{
if (reset) resetExtraction();
if (!_rSession.isConnected())
{
_state = ST_DONE;
throw NotConnectedException(_rSession.connectionString());
}
std::size_t lim = 0;
if (_lowerLimit > _extrLimit.value())
throw LimitException("Illegal Statement state. Upper limit must not be smaller than the lower limit.");
do
try
{
compile();
if (reset) resetExtraction();
if (!_rSession.isConnected())
throw NotConnectedException(_rSession.connectionString());
if (_lowerLimit > _extrLimit.value())
throw LimitException("Illegal Statement state. Upper limit must not be smaller than the lower limit.");
do
{
compile();
if (_extrLimit.value() == Limit::LIMIT_UNLIMITED)
lim += executeWithoutLimit();
else
lim += executeWithLimit();
} while (canCompile());
if (_extrLimit.value() == Limit::LIMIT_UNLIMITED)
lim += executeWithoutLimit();
else
lim += executeWithLimit();
} while (canCompile());
_state = ST_DONE;
if (_extrLimit.value() == Limit::LIMIT_UNLIMITED)
if (lim < _lowerLimit)
throw LimitException("Did not receive enough data.");
assignSubTotal(reset);
}
catch(...)
{
_state = ST_DONE;
if (lim < _lowerLimit)
throw LimitException("Did not receive enough data.");
assignSubTotal(reset);
throw;
}
return lim;
}