From 7aadac132d8512e7ee63970561f40ade80772726 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 29 Mar 2011 16:31:59 +0200 Subject: Support for shared cache and unlock notification --- odb/sqlite/error.cxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'odb/sqlite/error.cxx') diff --git a/odb/sqlite/error.cxx b/odb/sqlite/error.cxx index d223b4e..f84a6c0 100644 --- a/odb/sqlite/error.cxx +++ b/odb/sqlite/error.cxx @@ -39,8 +39,17 @@ namespace odb m = "SQLite API misuse"; break; } - case SQLITE_BUSY: case SQLITE_LOCKED: + { + if (ee != SQLITE_LOCKED_SHAREDCACHE) + throw deadlock (); // The DROP TABLE special case. + + // Getting SQLITE_LOCKED_SHAREDCACHE here means we don't have + // the unlock notify support. Translate this to timeout. + // + throw timeout (); + } + case SQLITE_BUSY: case SQLITE_IOERR: { if (e != SQLITE_IOERR || ee == SQLITE_IOERR_BLOCKED) -- cgit v1.1