aboutsummaryrefslogtreecommitdiff
path: root/odb/sqlite/error.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-03-29 16:31:59 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-03-29 16:31:59 +0200
commit7aadac132d8512e7ee63970561f40ade80772726 (patch)
tree001695ad14cd9c2e6937a8e5d45a32587d0a37d5 /odb/sqlite/error.cxx
parent2cdc08a9bcf807b4b908434c7bbe5439b0da3191 (diff)
Support for shared cache and unlock notification
Diffstat (limited to 'odb/sqlite/error.cxx')
-rw-r--r--odb/sqlite/error.cxx11
1 files changed, 10 insertions, 1 deletions
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)