Make LocalFile::lock() initialize DBO_TRX transactions
authorAaron Schulz <aschulz@wikimedia.org>
Thu, 14 Jul 2016 21:51:25 +0000 (14:51 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Thu, 14 Jul 2016 23:30:25 +0000 (23:30 +0000)
commita66544f2cfd4cb959b907ff4d9a07cac15ab7412
tree2fb88613e4dc7ea5fe27a9e1d0de27ac08030b68
parent1a7bde454ea4e0825e48037fba66638b4e967333
Make LocalFile::lock() initialize DBO_TRX transactions

If the first query to the master DB is after lock() and DBO_TRX is
set, make sure that the LocalFile updates still join the implicit
transaction that the rest of the request is in.

This helps keep the commit step tight when multiple DBs are touched
by making sure that the main DB commits in commitMasterChanges()
along with any others.

Bug: T119736
Change-Id: I6cc29f9201947e4415336528d30cba7f88567b41
includes/filerepo/file/LocalFile.php