getScopedLockAndFlush() should not commit when exceptions are thrown
authorAaron Schulz <aschulz@wikimedia.org>
Wed, 17 Aug 2016 21:05:41 +0000 (14:05 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Thu, 18 Aug 2016 05:49:31 +0000 (22:49 -0700)
commit7287e01b3d7505f3a012ae71ce09057875334e7e
treef18509752b4befcb8aaa3e95deac8f57f5e912a6
parent4e50792f7939b1d96ae52a87e3460ab1cffd7625
getScopedLockAndFlush() should not commit when exceptions are thrown

Previously it would commit() since the __destruct() call happens
as an exception is thrown but before it reached MWExceptionHandler.

Change-Id: I3d4186eb9ec02cf4d42ac84590869e2cf29b30b4
includes/db/Database.php
includes/db/IDatabase.php
tests/phpunit/includes/db/DatabaseTest.php