apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject svn commit: r398070 - /apr/apr-util/branches/1.2.x/dbd/apr_dbd_sqlite3.c
Date Sat, 29 Apr 2006 02:52:54 GMT
Author: bojan
Date: Fri Apr 28 19:52:52 2006
New Revision: 398070

URL: http://svn.apache.org/viewcvs?rev=398070&view=rev
Log:
Merge r398048 from the trunk.

Modified:
    apr/apr-util/branches/1.2.x/dbd/apr_dbd_sqlite3.c

Modified: apr/apr-util/branches/1.2.x/dbd/apr_dbd_sqlite3.c
URL: http://svn.apache.org/viewcvs/apr/apr-util/branches/1.2.x/dbd/apr_dbd_sqlite3.c?rev=398070&r1=398069&r2=398070&view=diff
==============================================================================
--- apr/apr-util/branches/1.2.x/dbd/apr_dbd_sqlite3.c (original)
+++ apr/apr-util/branches/1.2.x/dbd/apr_dbd_sqlite3.c Fri Apr 28 19:52:52 2006
@@ -331,7 +331,7 @@
     int ret = 0;
     int nrows = 0;
 
-    ret = dbd_sqlite3_query(handle, &nrows, "BEGIN TRANSACTION;");
+    ret = dbd_sqlite3_query(handle, &nrows, "BEGIN");
     if (!*trans) {
         *trans = apr_pcalloc(pool, sizeof(apr_dbd_transaction_t));
         (*trans)->handle = handle;
@@ -343,16 +343,15 @@
 
 static int dbd_sqlite3_end_transaction(apr_dbd_transaction_t *trans)
 {
-    int ret = 0;
+    int ret = -1; /* ending transaction that was never started is an error */
     int nrows = 0;
 
     if (trans) {
-        ret = dbd_sqlite3_query(trans->handle, &nrows, "END TRANSACTION;");
         if (trans->errnum) {
             trans->errnum = 0;
-            ret = dbd_sqlite3_query(trans->handle, &nrows, "ROLLBACK;");
+            ret = dbd_sqlite3_query(trans->handle, &nrows, "ROLLBACK");
         } else {
-            ret = dbd_sqlite3_query(trans->handle, &nrows, "COMMIT;");
+            ret = dbd_sqlite3_query(trans->handle, &nrows, "COMMIT");
         }
         trans->handle->trans = NULL;
     }



Mime
View raw message