Update sqlite3 to 3.8.8.2.

This commit is contained in:
seelabs
2015-02-08 17:57:23 -08:00
committed by Vinnie Falco
parent 7cf1ec3f89
commit c7cfd23580
7 changed files with 4044 additions and 1902 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -15,9 +15,8 @@
** as extensions by SQLite should #include this file instead of
** sqlite3.h.
*/
#ifndef BEAST_MODULE_SQLITE_SQLITE3EXT_H_INCLUDED
#define BEAST_MODULE_SQLITE_SQLITE3EXT_H_INCLUDED
#ifndef _SQLITE3EXT_H_
#define _SQLITE3EXT_H_
#include "sqlite3.h"
typedef struct sqlite3_api_routines sqlite3_api_routines;

View File

@@ -30,6 +30,7 @@
#include <condition_variable>
#include <thread>
namespace ripple {
class SHAMapStoreImp : public SHAMapStore
@@ -52,7 +53,7 @@ private:
class SavedStateDB
{
public:
beast::sqdb::session session_;
soci::session session_;
std::mutex mutex_;
beast::Journal journal_;
@@ -60,19 +61,18 @@ private:
// configured
SavedStateDB() = default;
// opens SQLite database and, if necessary, creates & initializes its tables.
void init (std::string const& databasePath, std::string const& dbName);
// opens database and, if necessary, creates & initializes its tables.
void init (BasicConfig const& config, std::string const& dbName);
// get/set the ledger index that we can delete up to and including
LedgerIndex getCanDelete();
LedgerIndex setCanDelete (LedgerIndex canDelete);
SavedState getState();
void setState (SavedState const& state);
void setLastRotated (LedgerIndex seq);
void checkError (beast::Error const& error);
};
// name of sqlite state database
std::string const dbName_ = "state.db";
// name of state database
std::string const dbName_ = "state";
// prefix of on-disk nodestore backend instances
std::string const dbPrefix_ = "rippledb";
// check health/stop status as records are copied
@@ -110,7 +110,8 @@ public:
NodeStore::Scheduler& scheduler,
beast::Journal journal,
beast::Journal nodeStoreJournal,
TransactionMaster& transactionMaster);
TransactionMaster& transactionMaster,
BasicConfig const& config);
~SHAMapStoreImp()
{
@@ -201,7 +202,7 @@ private:
* call with mutex object unlocked
*/
void clearSql (DatabaseCon& database, LedgerIndex lastRotated,
std::string const& minQuery, std::string const& deleteQuery);
std::string const& minQuery, std::string const& deleteQuery);
void clearCaches (LedgerIndex validatedSeq);
void freshenCaches();
void clearPrior (LedgerIndex lastRotated);