Committed by Greg Sabino Mullane <[email protected]>

Slight adjustment to new switch_prepared logic.

---
 dbdimp.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/dbdimp.c b/dbdimp.c
index 615b52a..beb07ca 100644
--- a/dbdimp.c
+++ b/dbdimp.c
@@ -3051,6 +3051,9 @@ int dbd_st_execute (SV * sth, imp_sth_t * imp_sth)
                                        imp_sth->has_default,
                                        imp_sth->has_current);
 
+       /* Increment our count */
+       imp_sth->number_iterations++;
+
        /* We must use PQexec if:
           1. The statement is *not* DML (e.g. is DDL, which cannot be prepared)
           2. We have a DEFAULT parameter
@@ -3074,9 +3077,6 @@ int dbd_st_execute (SV * sth, imp_sth_t * imp_sth)
                pqtype = 3; /* PQexecPrepared */
        }
 
-       /* Increment our count */
-       imp_sth->number_iterations++;
-
        /* We use the new server_side prepare style if:
           1. The statement is DML (DDL is not preparable)
           2. The attribute "pg_direct" is false
-- 
1.8.4

Reply via email to