Close #189 Database compaction #189

Call VACUUM on close unconditionally.
This commit is contained in:
Christian Hohnstaedt 2020-04-18 20:05:22 +02:00
parent 742bfbafc1
commit 7b6505ffde
2 changed files with 2 additions and 0 deletions

View File

@ -536,6 +536,7 @@ void MainWindow::close_database()
keys = NULL;
crls = NULL;
XSqlQuery q("VACUUM");
QSqlDatabase::database().close();
pki_evp::passwd.cleanse();
pki_evp::passwd = QByteArray();

View File

@ -237,6 +237,7 @@ bool OpenDb::_openDatabase(const QString &connName, const QString &pass) const
* dbType() could return "ODBC" but connect to MariaDB
*/
XSqlQuery q("SET SESSION SQL_MODE='ANSI'");
q.exec("PRAGMA secure_delete = 'true'");
return true;
}
XSqlQuery::clearTablePrefix();