mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-21 23:56:54 +02:00
fix(Data::ODBC): use connection and login timeouts in ODBC session implementation (#4721)
* fix(Data::ODBC): use connection and login timeouts in ODBC session implementation (#4366) * fix(Data::ODBC): use only connection timeout in ODBC session implementation (#4366) * fix(ODBC): consolidate login timeout; create temp directory if it doesn't exist #4366 --------- Co-authored-by: Alex Fabijanic <alex@pocoproject.org>
This commit is contained in:
@@ -52,7 +52,7 @@ const std::string SessionImpl::SQLITE_READ_COMMITTED = "PRAGMA read_uncommitted
|
||||
SessionImpl::SessionImpl(const std::string& fileName, std::size_t loginTimeout):
|
||||
Poco::Data::AbstractSessionImpl<SessionImpl>(fileName, loginTimeout),
|
||||
_connector(Connector::KEY),
|
||||
_pDB(0),
|
||||
_pDB(nullptr),
|
||||
_connected(false),
|
||||
_isTransaction(false),
|
||||
_transactionType(TransactionType::DEFERRED),
|
||||
@@ -213,7 +213,7 @@ void SessionImpl::open(const std::string& connect)
|
||||
while (true)
|
||||
{
|
||||
rc = sqlite3_open_v2(connectionString().c_str(), &_pDB,
|
||||
SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_URI, NULL);
|
||||
SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_URI, nullptr);
|
||||
if (rc == SQLITE_OK) break;
|
||||
if (!_pDB)
|
||||
throw ConnectionFailedException(std::string(sqlite3_errstr(rc)));
|
||||
@@ -240,7 +240,7 @@ void SessionImpl::close()
|
||||
if (_pDB)
|
||||
{
|
||||
sqlite3_close_v2(_pDB);
|
||||
_pDB = 0;
|
||||
_pDB = nullptr;
|
||||
}
|
||||
|
||||
_connected = false;
|
||||
|
Reference in New Issue
Block a user