apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject svn commit: r414125 - /apr/apr-util/trunk/dbd/apr_dbd_sqlite3.c
Date Wed, 14 Jun 2006 06:53:08 GMT
Author: bojan
Date: Tue Jun 13 23:53:08 2006
New Revision: 414125

URL: http://svn.apache.org/viewvc?rev=414125&view=rev
Log:
Delay getting parameter count until after transaction check.

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?rev=414125&r1=414124&r2=414125&view=diff
==============================================================================
--- apr/apr-util/trunk/dbd/apr_dbd_sqlite3.c (original)
+++ apr/apr-util/trunk/dbd/apr_dbd_sqlite3.c Tue Jun 13 23:53:08 2006
@@ -403,12 +403,13 @@
                                apr_dbd_prepared_t *statement, va_list args)
 {
     const char **values;
-    int i, nargs = sqlite3_bind_parameter_count(statement->stmt);
+    int i, nargs;
 
     if (sql->trans && sql->trans->errnum) {
         return sql->trans->errnum;
     }
 
+    nargs = sqlite3_bind_parameter_count(statement->stmt);
     values = apr_palloc(pool, sizeof(*values) * nargs);
 
     for (i = 0; i < nargs; i++) {
@@ -538,12 +539,13 @@
                                 va_list args)
 {
     const char **values;
-    int i, nargs = sqlite3_bind_parameter_count(statement->stmt);
+    int i, nargs;
 
     if (sql->trans && sql->trans->errnum) {
         return sql->trans->errnum;
     }
 
+    nargs = sqlite3_bind_parameter_count(statement->stmt);
     values = apr_palloc(pool, sizeof(*values) * nargs);
 
     for (i = 0; i < nargs; i++) {



Mime
View raw message