Age | Commit message (Collapse) | Author | |
---|---|---|---|
2020-10-22 | wallet: fix buffer over-read in SQLite file magic check | Sebastian Falbesoner | |
If there is no terminating zero within the 16 magic bytes, the buffer would be over-read in the std::string constructor. Fixed by using the "from buffer" variant of the ctor (that also takes a size) rather than the "from c-string" variant. | |||
2020-10-14 | wallet: Enforce sqlite serialized threading mode | Andrew Chow | |
2020-10-14 | Set and check the sqlite user version | Andrew Chow | |
2020-10-14 | Use network magic as sqlite wallet application ID | Andrew Chow | |
2020-10-14 | Determine wallet file type based on file magic | Andrew Chow | |
2020-10-14 | Implement SQLiteDatabase::MakeBatch | Andrew Chow | |
2020-10-14 | Implement SQLiteDatabase::Verify | Andrew Chow | |
2020-10-14 | Implement SQLiteDatabase::Rewrite | Andrew Chow | |
Rewrite uses the VACUUM command which does exactly what we want. A specific advertised use case is to compact a database and ensure that any deleted data is actually deleted. | |||
2020-10-14 | Implement SQLiteDatabase::TxnBegin, TxnCommit, and TxnAbort | Andrew Chow | |
2020-10-14 | Implement SQLiteDatabase::Backup | Andrew Chow | |
2020-10-14 | Implement SQLiteBatch::StartCursor, ReadAtCursor, and CloseCursor | Andrew Chow | |
2020-10-14 | Implement SQLiteBatch::ReadKey, WriteKey, EraseKey, and HasKey | Andrew Chow | |
2020-10-14 | Add SetupSQLStatements | Andrew Chow | |
2020-10-14 | Implement SQLiteBatch::Close | Andrew Chow | |
2020-10-14 | Implement SQLiteDatabase::Close | Andrew Chow | |
2020-10-14 | Implement SQLiteDatabase::Open | Andrew Chow | |
2020-10-14 | Initialize and Shutdown sqlite3 globals | Andrew Chow | |
sqlite3 recommends that sqlite3_initialize be called when the application starts, and sqlite3_shutdown when it stops. Since we don't always use sqlite3, we initialize it when a SQLiteDatabse is constructed (calling sqlite3_initialize after initialized is a no-op). We call sqlite3_shutdown when we see that there are no databases opened. The number of open databases is tracked by an atomic g_dbs_open. | |||
2020-10-14 | Constructors, destructors, and relevant private fields for SQLiteDatabase/Batch | Andrew Chow | |
2020-10-14 | Implement SQLiteDatabaseVersion | Andrew Chow | |
2020-10-14 | Add SQLiteDatabase and SQLiteBatch dummy classes | Andrew Chow | |