Improve Database::__destruct() and add a __clone() method too
authorAaron Schulz <aschulz@wikimedia.org>
Tue, 20 Sep 2016 16:17:14 +0000 (09:17 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Tue, 20 Sep 2016 22:04:11 +0000 (22:04 +0000)
commita591ed57933d5168ae911c34c36da1d3fe572f70
treec10052011141c9162466dbc1c3867bf5c84becd9
parentf197ed2395dba813fb407d71ab04109edf8c93f5
Improve Database::__destruct() and add a __clone() method too

* Close dangling connections in LoadBalancer/Database destructors.
* When DBs are cloned, create new connection resources for the clone
  so the two do Database objects don't clobber each other.

Change-Id: I3adb57cbb1fdc2a17e6d95389d0562ef22701576
includes/libs/rdbms/database/Database.php
includes/libs/rdbms/loadbalancer/LoadBalancer.php