mirror of
https://github.com/Telecominfraproject/wlan-cloud-lib-poco.git
synced 2025-11-01 19:17:59 +00:00
Added check for null pointer before accessing and leaving SQLite mutex. (#2276)
* Added check for null pointer before accessing and leaving sqlite mutex. * Update null pointer checks for SQLite mutex
This commit is contained in:
committed by
Aleksandar Fabijanic
parent
65e5c34869
commit
49aa90738e
@@ -55,6 +55,7 @@ using Poco::SQL::Column;
|
||||
using Poco::SQL::Row;
|
||||
using Poco::SQL::SQLChannel;
|
||||
using Poco::SQL::LimitException;
|
||||
using Poco::SQL::ConnectionFailedException;
|
||||
using Poco::SQL::CLOB;
|
||||
using Poco::SQL::Date;
|
||||
using Poco::SQL::Time;
|
||||
@@ -3708,6 +3709,18 @@ void SQLiteTest::testIncrementVacuum()
|
||||
tmp << "PRAGMA incremental_vacuum(1024);", now;
|
||||
}
|
||||
|
||||
void SQLiteTest::testIllegalFilePath()
|
||||
{
|
||||
try
|
||||
{
|
||||
Session tmp (Poco::SQL::SQLite::Connector::KEY, "\\/some\\/illegal\\/path\\/dummy.db", 1);
|
||||
fail("must fail");
|
||||
}
|
||||
catch (ConnectionFailedException&)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
CppUnit::Test* SQLiteTest::suite()
|
||||
{
|
||||
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("SQLiteTest");
|
||||
@@ -3801,6 +3814,7 @@ CppUnit::Test* SQLiteTest::suite()
|
||||
CppUnit_addTest(pSuite, SQLiteTest, testTransactor);
|
||||
CppUnit_addTest(pSuite, SQLiteTest, testFTS3);
|
||||
CppUnit_addTest(pSuite, SQLiteTest, testJSONRowFormatter);
|
||||
CppUnit_addTest(pSuite, SQLiteTest, testIllegalFilePath);
|
||||
//
|
||||
// To be fixed by dimanikulin
|
||||
// CppUnit_addTest(pSuite, SQLiteTest, testIncrementVacuum);
|
||||
|
||||
@@ -139,6 +139,8 @@ public:
|
||||
|
||||
void testIncrementVacuum();
|
||||
|
||||
void testIllegalFilePath();
|
||||
|
||||
void setUp();
|
||||
void tearDown();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user