aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorByron Nikolaidis <byronn@insightdist.com>2000-02-28 00:23:18 +0000
committerByron Nikolaidis <byronn@insightdist.com>2000-02-28 00:23:18 +0000
commita7b1a008cdf4032dbabc9a174928c5584f09a64f (patch)
treeda7d4802e59765d4def7d887bc45d9d0115f7672
parent18baa9790e40b72786dfa58b7d50d1dae37961eb (diff)
downloadpostgresql-a7b1a008cdf4032dbabc9a174928c5584f09a64f.tar.gz
postgresql-a7b1a008cdf4032dbabc9a174928c5584f09a64f.zip
missing state transition
-rw-r--r--src/interfaces/odbc/execute.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/interfaces/odbc/execute.c b/src/interfaces/odbc/execute.c
index fd82e0df718..3f3549c89fd 100644
--- a/src/interfaces/odbc/execute.c
+++ b/src/interfaces/odbc/execute.c
@@ -157,6 +157,13 @@ static char *func = "SQLExecDirect";
mylog("**** %s: hstmt=%u, statement='%s'\n", func, hstmt, stmt->statement);
stmt->prepare = FALSE;
+
+ // If an SQLPrepare was performed prior to this, but was left in
+ // the premature state because an error occurred prior to SQLExecute
+ // then set the statement to finished so it can be recycled.
+ if ( stmt->status == STMT_PREMATURE )
+ stmt->status = STMT_FINISHED;
+
stmt->statement_type = statement_type(stmt->statement);
// Check if connection is onlyread (only selects are allowed)