Cleanups to DB transaction handling
authorAaron Schulz <aschulz@wikimedia.org>
Tue, 5 Nov 2013 00:00:33 +0000 (16:00 -0800)
committerAaron Schulz <aschulz@wikimedia.org>
Wed, 6 Nov 2013 19:29:35 +0000 (11:29 -0800)
commit54664be154a904c9824346551f49844fde289b83
treefd39bab68119458a6050d3aaf0b5fa3cf17b939e
parent2cf410a31ff1b71abfac58cb2bdd4e8962b36ad9
Cleanups to DB transaction handling

* Only do requeries after automatic reconnection if there is no trx open instead.
  of doing possible half-broken changes and not fully updating trx state variables
* Also made trxLevel() no longer take an argument.
* Avoid clearing trx fields in some redundant places to make the code simpler
  Only mTrxLevel needs to be well tracked in various places. For the other fields,
  code just checks mTrxLevel before using those fields.
  They do need to be cleared in begin() though.
* Moved endAtomic() up next to startAtomic().
* Improved mTrxLevel docs

Change-Id: I12adfb4fcb28a4832facd63baee2283ead500bd2
includes/db/Database.php