From: | "Glen Parker" <glenebob(at)nwlink(dot)com> |
---|---|
To: | <pgsql-odbc(at)postgresql(dot)org> |
Subject: | Re: Driver confused by explicit transactions |
Date: | 2002-12-07 00:28:32 |
Message-ID: | 02ac01c29d87$92fb1730$0b01a8c0@johnpark.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-odbc |
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(at)nwlink(dot)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(at)nwlink(dot)com
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
http://archives.postgresql.org
From | Date | Subject | |
---|---|---|---|
Next Message | Hiroshi Inoue | 2002-12-07 14:00:20 | Re: Driver confused by explicit transactions |
Previous Message | Glen Parker | 2002-12-06 23:47:16 | Driver confused by explicit transactions |