Diff
Not logged in

Differences From:

File src/db.c part of check-in [8d529a7ae9] - Tidy up the raw tags web page, and provide a way to get there, for admins only by eric on 2008-11-26 21:59:42. [view]

To:

File src/db.c part of check-in [892c460b8e] - Add a 5 second busy timeout on the database connection. by drh on 2008-12-03 14:22:00. [view]

@@ -597,8 +597,9 @@
   rc = sqlite3_open(zFileName, &db);
   if( rc!=SQLITE_OK ){
     db_err(sqlite3_errmsg(db));
   }
+  sqlite3_busy_timeout(db, 5000);
   sqlite3_exec(db, "BEGIN EXCLUSIVE", 0, 0, 0);
   rc = sqlite3_exec(db, zSchema, 0, 0, 0);
   if( rc!=SQLITE_OK ){
     db_err(sqlite3_errmsg(db));
@@ -628,8 +629,9 @@
     int rc = sqlite3_open(zDbName, &g.db);
     if( rc!=SQLITE_OK ){
       db_err(sqlite3_errmsg(g.db));
     }
+    sqlite3_busy_timeout(g.db, 5000);
     db_connection_init();
   }else{
     db_multi_exec("ATTACH DATABASE %Q AS %s", zDbName, zLabel);
   }