TransactionTestCase._fixture_teardown locks under mysql
|Ready for checkin
|Patch needs improvement:
When using multiple aliases to the same DB (either via TEST_MIRROR or simply different aliases with the same settings), it is possible to get 2 pending transactions because each DB alias gets its own connection to the DB.
The change in f758bdab moves DB flush to the end of the test case -- this is nice because it allows test case reordering and related optimizations.
Unfortunately, moving it to the end also means that the DB connection states aren't as clean as they were at the beginning of the testcase, so it's possible that a pending transaction on one alias blocks the progress of the flush command.