Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id C4157475C2B for ; Fri, 6 Dec 2002 19:28:18 -0500 (EST) Received: from frankenstein.nwlink.com (pop.nwlink.com [209.20.130.39]) by postgresql.org (Postfix) with ESMTP id EA969475B33 for ; Fri, 6 Dec 2002 19:28:17 -0500 (EST) Received: from mercury.johnpark.net (ip188.gte31.rb1.bel.nwlink.com [207.202.209.188]) by frankenstein.nwlink.com (8.11.3/8.11.3) with ESMTP id gB70SKS46398 for ; Fri, 6 Dec 2002 16:28:20 -0800 (PST) (envelope-from glenebob@nwlink.com) Received: from saturn (saturn.johnpark.net [192.168.1.11]) by mercury.johnpark.net (8.11.6/8.11.6) with ESMTP id gB71Rtp09638 for ; Fri, 6 Dec 2002 17:27:55 -0800 From: "Glen Parker" To: Subject: Re: Driver confused by explicit transactions Date: Fri, 6 Dec 2002 16:28:32 -0800 Message-ID: <02ac01c29d87$92fb1730$0b01a8c0@johnpark.net> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 In-Reply-To: <02ab01c29d81$ced34710$0b01a8c0@johnpark.net> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/41 X-Sequence-Number: 2430 It appears that this is fixed simply by having PGAPI_Transact() call CC_set_autocommit_on(conn) after sending and verifying success of a commit/abort statement to the server. That makes the end of PGAPI_Transact() look like this in my copy: if (!ok) { CC_on_abort(conn, NO_TRANS); CC_log_error(func, "", conn); return SQL_ERROR; } /* get (back) into auto-commit mode */ CC_set_autocommit_on(conn); } return SQL_SUCCESS; } Glen Parker glenebob@nwlink.com > It appears there is a somewhat on-going bug in the ODBC driver > (07.02.0005 in this case) concerning explicit transactions. The > following sequence demonstrates it. > > Begin transaction (OK) > Execute update statement(s) (OK, records hidden from other > transactions) > Commit transaction (OK, records appear to other transactions) > Execute update statement(s) (OK, but records hidden from other > transactions, should be visible) > Commit transaction (OK, records appear to other transactions) > > I'm going to dive into the code and see what I see, but > wanted to report > the symptoms so others can look too. I suspect the driver is > failing to > turn auto-commit mode back on after the explicit commit, and > is starting > a new transaction for statements following the commit when it > should not > be, which do not get committed automatically. > > Glen Parker > glenebob@nwlink.com > > > ---------------------------(end of > broadcast)--------------------------- > TIP 6: Have you searched our list archives? > http://archives.postgresql.org