apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject svn commit: r490635 - /apr/apr-util/trunk/dbd/apr_dbd_sqlite3.c
Date Thu, 28 Dec 2006 02:55:01 GMT
Author: bojan
Date: Wed Dec 27 18:55:00 2006
New Revision: 490635

URL: http://svn.apache.org/viewvc?view=rev&rev=490635
Log:
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

Modified:
    apr/apr-util/trunk/dbd/apr_dbd_sqlite3.c

Modified: apr/apr-util/trunk/dbd/apr_dbd_sqlite3.c
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/dbd/apr_dbd_sqlite3.c?view=diff&rev=490635&r1=490634&r2=490635
==============================================================================
--- apr/apr-util/trunk/dbd/apr_dbd_sqlite3.c (original)
+++ apr/apr-util/trunk/dbd/apr_dbd_sqlite3.c Wed Dec 27 18:55:00 2006
@@ -563,7 +563,7 @@
     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;



Mime
View raw message