diff options
author | bojan <bojan@13f79535-47bb-0310-9956-ffa450edef68> | 2006-12-28 02:55:00 +0000 |
---|---|---|
committer | bojan <bojan@13f79535-47bb-0310-9956-ffa450edef68> | 2006-12-28 02:55:00 +0000 |
commit | b8617dc8beadf72bd861776d46131025acffb18f (patch) | |
tree | 202b1ba4f2aea67c022aa6e062e0cee95744fdf0 /dbd/apr_dbd_sqlite3.c | |
parent | 45bfaa076523ef2467f5d54417677c6f9a6ee1b0 (diff) | |
download | libapr-util-b8617dc8beadf72bd861776d46131025acffb18f.tar.gz |
Avoid deadlocks between transactions by asking for a RESERVED lock right away.
Rationale: transactions usually update the database
experiments show better performance under high concurrency
git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@490635 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'dbd/apr_dbd_sqlite3.c')
-rw-r--r-- | dbd/apr_dbd_sqlite3.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dbd/apr_dbd_sqlite3.c b/dbd/apr_dbd_sqlite3.c index 0e4fca02..dd3ecade 100644 --- a/dbd/apr_dbd_sqlite3.c +++ b/dbd/apr_dbd_sqlite3.c @@ -563,7 +563,7 @@ static int dbd_sqlite3_start_transaction(apr_pool_t *pool, int ret = 0; int nrows = 0; - ret = dbd_sqlite3_query(handle, &nrows, "BEGIN"); + ret = dbd_sqlite3_query(handle, &nrows, "BEGIN IMMEDIATE"); if (!*trans) { *trans = apr_pcalloc(pool, sizeof(apr_dbd_transaction_t)); (*trans)->handle = handle; |