Merge "rdbms: Disable DBConnRef::selectDB() for sanity"
[lhc/web/wiklou.git] / includes / libs / rdbms / database / DBConnRef.php
index 7cb0604..eba1657 100644 (file)
@@ -371,7 +371,8 @@ class DBConnRef implements IDatabase {
        }
 
        public function selectDB( $db ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
+               // Disallow things that might confuse the LoadBalancer tracking
+               throw new DBUnexpectedError( $this, "Database selection is disallowed to enable reuse." );
        }
 
        public function getDBname() {