LoadBalancerTest: Clean up transaction handling for sqlite
authorBrad Jorsch <bjorsch@wikimedia.org>
Fri, 13 Apr 2018 17:32:48 +0000 (13:32 -0400)
committerBrad Jorsch <bjorsch@wikimedia.org>
Fri, 13 Apr 2018 17:42:47 +0000 (13:42 -0400)
commit78c3b9c21a15030b7ac1cf15c2ae1806dd3d10db
treea8a66a3438153406e86b7d3b4a257dc1bcadfd42
parent93a531f935febc0d2f1c143ddef815a5ccf1a87b
LoadBalancerTest: Clean up transaction handling for sqlite

We need to make sure a DBO_TRX transaction was started before doing the
CREATE TABLE, because CREATE TABLE itself won't start one and sqlite
breaks if schema changes are done on one handle while another is open.

Also, incidentally, have the handles in these LoadBalancerTests log to
the standard channel. And clean up the auto-rollback of DBO_TRX
transactions to use ->rollback() instead of ->doRollback() plus
incorrect manual setting of trxStatus.

Bug: T191863
Change-Id: Ib422ef89e7eba21281e6ea98def9f98ae762b9fe
includes/libs/rdbms/database/Database.php
tests/phpunit/includes/db/LoadBalancerTest.php