Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,8 @@ Version 3.4.0 - 2026 ???
- Restore the Coverity Scan static analysis as a GitHub Actions workflow, replacing the old Travis CI job
- Fix Database::getHeaderInfo() signed-shift UB and use fixed-width types for the Header struct (#558)
- Restore SQLite::Header 3.x ABI compatibility while keeping fixed-width header parsing (#575)
- Fix Savepoint destructor to catch all exceptions and track rollback state to avoid std::terminate (#559)
- Fix Savepoint destructor to catch all exceptions to avoid std::terminate (#559)
- Restore SQLite::Savepoint 3.x ABI compatibility while retaining destructor exception safety (#576)
- Fix Transaction destructor to catch all exceptions to avoid std::terminate (#559)
- Fix the Meson build when the SQLITECPP_DISABLE_STD_FILESYSTEM option is enabled (#560)
- Add Statement::RowIterator to support range-based for loops over query results (#181)
Expand Down
7 changes: 3 additions & 4 deletions include/SQLiteCpp/Savepoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,9 @@ class SQLITECPP_API Savepoint
void rollback() { rollbackTo(); }

private:
Database& mDatabase; ///< Reference to the SQLite Database Connection
std::string msName; ///< Name of the Savepoint
bool mbReleased = false; ///< True when release has been called
bool mbRolledBack = false; ///< True when a rollback to the savepoint has been done
Database& mDatabase; ///< Reference to the SQLite Database Connection
std::string msName; ///< Name of the Savepoint
bool mbReleased = false; ///< True when release has been called
};

} // namespace SQLite
6 changes: 1 addition & 5 deletions src/Savepoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,7 @@ Savepoint::~Savepoint()
{
try
{
if (!mbRolledBack)
{
rollbackTo();
}
rollbackTo();
release();
}
catch (...)
Expand Down Expand Up @@ -74,7 +71,6 @@ void Savepoint::rollbackTo()
if (!mbReleased)
{
mDatabase.exec(std::string("ROLLBACK TO SAVEPOINT ") + msName);
mbRolledBack = true;
}
else
{
Expand Down
Loading