Merge "rdbms: Disable DBConnRef::selectDB() for sanity"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 16 Aug 2018 04:33:58 +0000 (04:33 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 16 Aug 2018 04:33:58 +0000 (04:33 +0000)
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() {