Previously, sqlite would fail any query if there was a lock held on
the database, such as an outstanding write. In practice this
generated failures even with low-volume writes to the database.
Permit a query to hang for up to 200 ms.
INFO("rlm_sql_sqlite: Opening SQLite database \"%s\"", driver->filename);
#ifdef HAVE_SQLITE3_OPEN_V2
status = sqlite3_open_v2(driver->filename, &(conn->db), SQLITE_OPEN_READWRITE | SQLITE_OPEN_NOMUTEX, NULL);
+ sqlite3_busy_timeout( conn->db, 200); /*wait up to 200 ms for db locks*/
#else
+
status = sqlite3_open(driver->filename, &(conn->db));
#endif
if (!conn->db) {