aboutsummaryrefslogtreecommitdiff
path: root/odb/sqlite/error.cxx
diff options
context:
space:
mode:
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)