<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/sqlalchemy.git/test/engine/test_transaction.py, branch pr/156</title>
<subtitle>github.com: zzzeek/sqlalchemy.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/'/>
<entry>
<title>- repair autorollback for branches</title>
<updated>2014-09-27T01:41:15+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2014-09-27T01:41:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=573877b4bc4fabcdae8b22e5257fc80de478a507'/>
<id>573877b4bc4fabcdae8b22e5257fc80de478a507</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>- Fixed bug where a "branched" connection, that is the kind you get</title>
<updated>2014-09-26T20:25:26+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2014-09-26T20:25:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=b89523f0b75e8d39bcbd8a5c07015e9df4ef5e2f'/>
<id>b89523f0b75e8d39bcbd8a5c07015e9df4ef5e2f</id>
<content type='text'>
when you call :meth:`.Connection.connect`, would not share transaction
status with the parent.  The architecture of branching has been tweaked
a bit so that the branched connection defers to the parent for
all transactional status and operations.
fixes #3190
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
when you call :meth:`.Connection.connect`, would not share transaction
status with the parent.  The architecture of branching has been tweaked
a bit so that the branched connection defers to the parent for
all transactional status and operations.
fixes #3190
</pre>
</div>
</content>
</entry>
<entry>
<title>- these tests don't test anything in SQLAlchemy - from our perpsective,</title>
<updated>2014-09-19T16:41:07+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2014-09-19T16:39:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=f458ef84569c63ca1f98bfda3aef6f41119940e0'/>
<id>f458ef84569c63ca1f98bfda3aef6f41119940e0</id>
<content type='text'>
we need to be in transactions (tested elsewhere) and we need to
emit the correct FOR UPDATE strings (tested elsewhere).  There's nothing
in SQLA to be tested as far as validating that for update causes exceptions
or not, and these tests frequently fail as they are timing sensitive.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
we need to be in transactions (tested elsewhere) and we need to
emit the correct FOR UPDATE strings (tested elsewhere).  There's nothing
in SQLA to be tested as far as validating that for update causes exceptions
or not, and these tests frequently fail as they are timing sensitive.
</pre>
</div>
</content>
</entry>
<entry>
<title>two_phase_recover, COMMIT PREPARED in transaction</title>
<updated>2014-08-02T14:29:36+00:00</updated>
<author>
<name>Tony Locke</name>
<email>tlocke@tlocke.org.uk</email>
</author>
<published>2014-07-26T19:10:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=ed1bbbed272d6413561a2b5a29873f1021890c0d'/>
<id>ed1bbbed272d6413561a2b5a29873f1021890c0d</id>
<content type='text'>
In test/engine/test_transaction/test_two_phase_recover(), a COMMIT
PREPARED is issued while in a transaction. This causes an error, and
a prepared transaction is left hanging around which causes
the subsequent test to hang. I've altered the test to execute the
offending query with autocommit=true, then when it gets to the COMMIT
PRPARED it can go ahead.

There's another complication for pg8000 because its tpc_recover() method
started a transaction if one wasn't already in progress. I've decided
that this is incorrect behaviour and so from pg8000-1.9.13 this method
never starts or stops a transaction.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In test/engine/test_transaction/test_two_phase_recover(), a COMMIT
PREPARED is issued while in a transaction. This causes an error, and
a prepared transaction is left hanging around which causes
the subsequent test to hang. I've altered the test to execute the
offending query with autocommit=true, then when it gets to the COMMIT
PRPARED it can go ahead.

There's another complication for pg8000 because its tpc_recover() method
started a transaction if one wasn't already in progress. I've decided
that this is incorrect behaviour and so from pg8000-1.9.13 this method
never starts or stops a transaction.
</pre>
</div>
</content>
</entry>
<entry>
<title>typo: s/thbe/the</title>
<updated>2014-06-28T09:47:19+00:00</updated>
<author>
<name>Priit Laes</name>
<email>plaes@plaes.org</email>
</author>
<published>2014-06-28T09:47:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=68a72ee0c4a0769d4233baa25f39a393edf70247'/>
<id>68a72ee0c4a0769d4233baa25f39a393edf70247</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>typo: s/tranasction/transaction</title>
<updated>2014-06-28T09:46:46+00:00</updated>
<author>
<name>Priit Laes</name>
<email>plaes@plaes.org</email>
</author>
<published>2014-06-28T09:46:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=eb5f398a01db4e1df615eb7a5d01187122e47f26'/>
<id>eb5f398a01db4e1df615eb7a5d01187122e47f26</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>- rename __multiple__ to __backend__, and apply __backend__ to a large number of tests.</title>
<updated>2014-03-24T15:33:53+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2014-03-24T15:33:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=2f150bee28525d49e7f36d2e0c7fbeda2352bc3a'/>
<id>2f150bee28525d49e7f36d2e0c7fbeda2352bc3a</id>
<content type='text'>
- move out logging tests from test_execute to test_logging
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- move out logging tests from test_execute to test_logging
</pre>
</div>
</content>
</entry>
<entry>
<title>- continue with [ticket:2907] and further clean up how we set up</title>
<updated>2014-01-13T08:22:11+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2014-01-13T08:22:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=bebf30e34d669a5ede54e512e55ee5186fe015f6'/>
<id>bebf30e34d669a5ede54e512e55ee5186fe015f6</id>
<content type='text'>
_reset_agent, so that it's local to the various begin_impl(),
rollback_impl(), etc.  this allows setting/resetting of the flag
to be symmetric.
- don't set _reset_agent if it's not None, don't unset it if it isn't
our own transaction.
- make sure we clean it out in close().
- basically, we're dealing here with pools using "threadlocal" that have a
counter, other various mismatches that the tests bring up
- test for recover() now has to invalidate() the previous connection,
because closing it actually rolls it back (e.g. this test was relying
on the broken behavior).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
_reset_agent, so that it's local to the various begin_impl(),
rollback_impl(), etc.  this allows setting/resetting of the flag
to be symmetric.
- don't set _reset_agent if it's not None, don't unset it if it isn't
our own transaction.
- make sure we clean it out in close().
- basically, we're dealing here with pools using "threadlocal" that have a
counter, other various mismatches that the tests bring up
- test for recover() now has to invalidate() the previous connection,
because closing it actually rolls it back (e.g. this test was relying
on the broken behavior).
</pre>
</div>
</content>
</entry>
<entry>
<title>- :class:`.Connection` now associates a new</title>
<updated>2014-01-13T00:43:13+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2014-01-13T00:43:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=9c64607572a04eb2ed7981db8999732100f39d4d'/>
<id>9c64607572a04eb2ed7981db8999732100f39d4d</id>
<content type='text'>
:class:`.RootTransaction` or :class:`.TwoPhaseTransaction`
with its immediate :class:`._ConnectionFairy` as a "reset handler"
for the span of that transaction, which takes over the task
of calling commit() or rollback() for the "reset on return" behavior
of :class:`.Pool` if the transaction was not otherwise completed.
This resolves the issue that a picky transaction
like that of MySQL two-phase will be
properly closed out when the connection is closed without an
explicit rollback or commit (e.g. no longer raises "XAER_RMFAIL"
in this case - note this only shows up in logging as the exception
is not propagated within pool reset).
This issue would arise e.g. when using an orm
:class:`.Session` with ``twophase`` set, and then
:meth:`.Session.close` is called without an explicit rollback or
commit.   The change also has the effect that you will now see
an explicit "ROLLBACK" in the logs when using a :class:`.Session`
object in non-autocommit mode regardless of how that session was
discarded.  Thanks to Jeff Dairiki and Laurence Rowe for isolating
the issue here. [ticket:2907]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
:class:`.RootTransaction` or :class:`.TwoPhaseTransaction`
with its immediate :class:`._ConnectionFairy` as a "reset handler"
for the span of that transaction, which takes over the task
of calling commit() or rollback() for the "reset on return" behavior
of :class:`.Pool` if the transaction was not otherwise completed.
This resolves the issue that a picky transaction
like that of MySQL two-phase will be
properly closed out when the connection is closed without an
explicit rollback or commit (e.g. no longer raises "XAER_RMFAIL"
in this case - note this only shows up in logging as the exception
is not propagated within pool reset).
This issue would arise e.g. when using an orm
:class:`.Session` with ``twophase`` set, and then
:meth:`.Session.close` is called without an explicit rollback or
commit.   The change also has the effect that you will now see
an explicit "ROLLBACK" in the logs when using a :class:`.Session`
object in non-autocommit mode regardless of how that session was
discarded.  Thanks to Jeff Dairiki and Laurence Rowe for isolating
the issue here. [ticket:2907]
</pre>
</div>
</content>
</entry>
<entry>
<title>something changed the name here, probably one of those doc pullreqs</title>
<updated>2013-11-21T22:24:51+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2013-11-21T22:24:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=fcbaf666a9a8421abfc60550c3e48b47c271d26e'/>
<id>fcbaf666a9a8421abfc60550c3e48b47c271d26e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
