X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 556DFD1B976 for ; Fri, 9 Jan 2004 21:51:21 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 93653-04 for ; Fri, 9 Jan 2004 17:50:52 -0400 (AST) Received: from relay.netbox.cz (relay.netbox.cz [212.96.166.9]) by svr1.postgresql.org (Postfix) with ESMTP id 603D7D1B4AD for ; Fri, 9 Jan 2004 17:50:50 -0400 (AST) Received: from localhost (localhost [127.0.0.1]) by localhost.netbox.cz (Postfix) with ESMTP id 23C6137B72 for ; Fri, 9 Jan 2004 22:50:52 +0100 (CET) Received: from relay.netbox.cz ([127.0.0.1]) by localhost (relay [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 19353-02-3 for ; Fri, 9 Jan 2004 22:50:51 +0100 (CET) Received: from smtp.pzkagis.cz (gis.netbox.cz [212.96.173.85]) by relay.netbox.cz (Postfix) with ESMTP id 127FC37B6E for ; Fri, 9 Jan 2004 22:50:51 +0100 (CET) Received: (from luf@localhost) by smtp.pzkagis.cz (8.11.6/8.11.6) id i09LomI16288 for pgsql-odbc@postgresql.org; Fri, 9 Jan 2004 22:50:48 +0100 Date: Fri, 9 Jan 2004 22:50:47 +0100 From: Ludek Finstrle To: pgsql-odbc@postgresql.org Subject: Bug in clear_error in SQLExecute? (fwd) Message-ID: <20040109215047.GA16187@soptik.pzkagis.cz> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="oyUTqETQ0mS9luUI" Content-Disposition: inline User-Agent: Mutt/1.4i X-Virus-Scanned: by amavisd-new-20030616-p5 (Debian) at relay.netbox.cz X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200401/15 X-Sequence-Number: 3644 --oyUTqETQ0mS9luUI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline > Hello, > > I think I found a bug in SQLExecute. IMHO SC_clean_error should be > called there only sometimes as you can see from my patch created > againist fresh CVS snapshot. > > Without this patch application fail becouse error is produced in Fetch > instead of in Execute. > > Commments are welcome > > Luf I forgot attach the patch so I try it again. Luf --oyUTqETQ0mS9luUI Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="odbc-clean_error.diff" --- PgSQL.orig/ODBC/odbcapi.c 2004-01-09 14:22:11.000000000 +0100 +++ PgSQL/ODBC/odbcapi.c 2004-01-09 22:17:41.054945600 +0100 @@ -333,6 +333,7 @@ mylog("[SQLExecute]"); ENTER_STMT_CS(stmt); + if (stmt->status == STMT_FINISHED) SC_clear_error(stmt); ret = PGAPI_Execute(StatementHandle, 0); LEAVE_STMT_CS(stmt); --oyUTqETQ0mS9luUI--