aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-10-16 14:27:36 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-10-16 14:27:36 +0200
commit7cdefdbe732c209e13f234eb71022791909a5518 (patch)
treee08e4754ddb31c0d518ff09f72bad440d494107d /src
parentd05bf044441dbf8e000036d545df9689bdec0b72 (diff)
Print a distinct warning for SQLITE_PROTOCOL
Diffstat (limited to 'src')
-rw-r--r--src/libstore/local-store.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc
index 64b5dd961..7f7f70bb8 100644
--- a/src/libstore/local-store.cc
+++ b/src/libstore/local-store.cc
@@ -49,10 +49,14 @@ static void throwSQLiteError(sqlite3 * db, const format & f)
{
int err = sqlite3_errcode(db);
if (err == SQLITE_BUSY || err == SQLITE_PROTOCOL) {
- static bool warned = false;
- if (!warned) {
- printMsg(lvlError, "warning: SQLite database is busy");
- warned = true;
+ if (err == SQLITE_PROTOCOL)
+ printMsg(lvlError, "warning: SQLite database is busy (SQLITE_PROTOCOL)");
+ else {
+ static bool warned = false;
+ if (!warned) {
+ printMsg(lvlError, "warning: SQLite database is busy");
+ warned = true;
+ }
}
/* Sleep for a while since retrying the transaction right away
is likely to fail again. */