1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-02 16:38:41 +00:00

Revert "Verify database connection on interval (#9665)"

Fixes #10113

This reverts commit 5c588f89e7.
This commit is contained in:
rubenwardy 2020-07-07 17:50:52 +01:00
parent dc6318b84a
commit 6e4d8de104
9 changed files with 33 additions and 65 deletions

View file

@ -36,13 +36,13 @@ public:
void beginSave();
void endSave();
// Open and initialize the database if needed
virtual void pingDatabase();
bool initialized() const { return m_initialized; }
protected:
Database_SQLite3(const std::string &savedir, const std::string &dbname);
// Open and initialize the database if needed
void verifyDatabase();
// Convertors
inline void str_to_sqlite(sqlite3_stmt *s, int iCol, const std::string &str) const
{
@ -146,8 +146,6 @@ public:
MapDatabaseSQLite3(const std::string &savedir);
virtual ~MapDatabaseSQLite3();
virtual void pingDatabase() { Database_SQLite3::pingDatabase(); }
bool saveBlock(const v3s16 &pos, const std::string &data);
void loadBlock(const v3s16 &pos, std::string *block);
bool deleteBlock(const v3s16 &pos);
@ -175,8 +173,6 @@ public:
PlayerDatabaseSQLite3(const std::string &savedir);
virtual ~PlayerDatabaseSQLite3();
virtual void pingDatabase() { Database_SQLite3::pingDatabase(); }
void savePlayer(RemotePlayer *player);
bool loadPlayer(RemotePlayer *player, PlayerSAO *sao);
bool removePlayer(const std::string &name);
@ -212,8 +208,6 @@ public:
AuthDatabaseSQLite3(const std::string &savedir);
virtual ~AuthDatabaseSQLite3();
virtual void pingDatabase() { Database_SQLite3::pingDatabase(); }
virtual bool getAuth(const std::string &name, AuthEntry &res);
virtual bool saveAuth(const AuthEntry &authEntry);
virtual bool createAuth(AuthEntry &authEntry);