pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Glen Parker <glenebob@nwlink.com>
To: pgsql-odbc@postgresql.org
Subject: Re: Driver confused by explicit transactions
Date: Fri, 6 Dec 2002 16:28:32 -0800
Message-ID: <02ac01c29d87$92fb1730$0b01a8c0@johnpark.net> (raw)
In-Reply-To: <02ab01c29d81$ced34710$0b01a8c0@johnpark.net>

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




view thread (5+ messages)  latest in thread

Message-ID: <02ac01c29d87$92fb1730$0b01a8c0@johnpark.net>
Permalink:  ../02ac01c29d87$92fb1730$0b01a8c0@johnpark.net/
Also on:    postgresql.org/message-id/02ac01c29d87$92fb1730$0b01a8c0@johnpark.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: glenebob@nwlink.com
  Subject: Re: Driver confused by explicit transactions
  In-Reply-To: <02ac01c29d87$92fb1730$0b01a8c0@johnpark.net>
  References: <02ab01c29d81$ced34710$0b01a8c0@johnpark.net> <02ac01c29d87$92fb1730$0b01a8c0@johnpark.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox