mirror of
https://github.com/tnodir/fort
synced 2024-11-15 14:56:05 +00:00
UI: StatManager: Vacuum on bulk deletes.
This commit is contained in:
parent
b88e396df2
commit
25bbd18d3b
@ -214,6 +214,8 @@ bool StatManager::clear()
|
|||||||
if (!sqliteDb()->execute(StatSql::sqlClear))
|
if (!sqliteDb()->execute(StatSql::sqlClear))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
sqliteDb()->execute(StatSql::sqlVacuum);
|
||||||
|
|
||||||
clearAppIdCache();
|
clearAppIdCache();
|
||||||
|
|
||||||
quotaManager()->clear();
|
quotaManager()->clear();
|
||||||
@ -401,6 +403,8 @@ bool StatManager::deleteConnAll()
|
|||||||
sqliteDb()->stmt(StatSql::sqlDeleteAllConnBlock) },
|
sqliteDb()->stmt(StatSql::sqlDeleteAllConnBlock) },
|
||||||
sqliteDb()->stmt(StatSql::sqlSelectDeletedAllConnAppList));
|
sqliteDb()->stmt(StatSql::sqlSelectDeletedAllConnAppList));
|
||||||
|
|
||||||
|
sqliteDb()->execute(StatSql::sqlVacuum);
|
||||||
|
|
||||||
sqliteDb()->commitTransaction();
|
sqliteDb()->commitTransaction();
|
||||||
|
|
||||||
m_connBlockIdMin = m_connBlockIdMax = 0;
|
m_connBlockIdMin = m_connBlockIdMax = 0;
|
||||||
|
@ -203,5 +203,6 @@ const char *const StatSql::sqlClear = "DELETE FROM app;"
|
|||||||
"DELETE FROM conn;"
|
"DELETE FROM conn;"
|
||||||
"DELETE FROM conn_block;"
|
"DELETE FROM conn_block;"
|
||||||
"DELETE FROM conn_traffic;"
|
"DELETE FROM conn_traffic;"
|
||||||
"DELETE FROM conn_flow;"
|
"DELETE FROM conn_flow;";
|
||||||
"VACUUM;";
|
|
||||||
|
const char *const StatSql::sqlVacuum = "VACUUM;";
|
||||||
|
@ -81,6 +81,7 @@ public:
|
|||||||
static const char *const sqlSelectDeletedAllConnAppList;
|
static const char *const sqlSelectDeletedAllConnAppList;
|
||||||
|
|
||||||
static const char *const sqlClear;
|
static const char *const sqlClear;
|
||||||
|
static const char *const sqlVacuum;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // STATSQL_H
|
#endif // STATSQL_H
|
||||||
|
Loading…
Reference in New Issue
Block a user