Overview
SHA1 Hash: | 892c460b8e3794ad969550d28312c21873b31992 |
---|---|
Date: | 2008-12-03 14:22:00 |
User: | drh |
Comment: | Add a 5 second busy timeout on the database connection. |
Timelines: | ancestors | descendants | both | trunk |
Other Links: | files | ZIP archive | manifest |
Tags And Properties
- branch=trunk inherited from [a28c83647d]
- sym-trunk inherited from [a28c83647d]
Changes
[hide diffs]Modified src/db.c from [9592bb6541] to [87e3dcf414].
@@ -596,10 +596,11 @@ #endif 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)); } @@ -627,10 +628,11 @@ if( !g.db ){ 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); } }