Skip to content

Commit 2b676c6

Browse files
authored
Revert "Use WAL mode for SQLite cache databases"
1 parent aa49e14 commit 2b676c6

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

src/libstore/sqlite.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ SQLite::~SQLite()
9393
void SQLite::isCache()
9494
{
9595
exec("pragma synchronous = off");
96-
exec("pragma main.journal_mode = wal");
96+
exec("pragma main.journal_mode = truncate");
9797
}
9898

9999
void SQLite::exec(const std::string & stmt)
@@ -250,7 +250,7 @@ void handleSQLiteBusy(const SQLiteBusy & e, time_t & nextWarning)
250250
if (now > nextWarning) {
251251
nextWarning = now + 10;
252252
logWarning({
253-
.msg = e.info().msg
253+
.msg = HintFmt(e.what())
254254
});
255255
}
256256

src/libutil/util.cc

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,8 @@ void ignoreExceptionInDestructor(Verbosity lvl)
190190
try {
191191
try {
192192
throw;
193-
} catch (Error & e) {
194-
printMsg(lvl, ANSI_RED "error (ignored):" ANSI_NORMAL " %s", e.info().msg);
195193
} catch (std::exception & e) {
196-
printMsg(lvl, ANSI_RED "error (ignored):" ANSI_NORMAL " %s", e.what());
194+
printMsg(lvl, "error (ignored): %1%", e.what());
197195
}
198196
} catch (...) { }
199197
}
@@ -204,10 +202,8 @@ void ignoreExceptionExceptInterrupt(Verbosity lvl)
204202
throw;
205203
} catch (const Interrupted & e) {
206204
throw;
207-
} catch (Error & e) {
208-
printMsg(lvl, ANSI_RED "error (ignored):" ANSI_NORMAL " %s", e.info().msg);
209205
} catch (std::exception & e) {
210-
printMsg(lvl, ANSI_RED "error (ignored):" ANSI_NORMAL " %s", e.what());
206+
printMsg(lvl, "error (ignored): %1%", e.what());
211207
}
212208
}
213209

0 commit comments

Comments
 (0)