Fixed clean up of sim db.

This commit is contained in:
Pedro Pinto committed 2020-12-14 11:55:47 -05:00
1 parent 4daf6e127e
commit e3a9adbf3f
1 file changed
+4 -2
@@ -68,8 +68,10 @@ SimDB::SessionID SimDB::create_session(std::string const &algo, bool clear_all)
std::lock_guard<std::mutex> l(me->db_lock);
if (clear_all) {
SQLite::Statement ca(me->db, "delete from log;delete from run");
ca.executeStep();
SQLite::Statement dl(me->db, "delete from log");
dl.exec();
SQLite::Statement dr(me->db, "delete from run");
dr.exec();
}
auto max_session_query = "select max(rowid) from run";