From 5891967297a5e1f69925baacbf0c3a4ed13291d6 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Tue, 14 Aug 2018 00:27:27 -0700 Subject: [PATCH] rdbms: Disable DBConnRef::selectDB() for sanity Bug: T193565 Change-Id: I4276d1a7d77a019e0e60dab4b9ec36c93e418037 --- includes/libs/rdbms/database/DBConnRef.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/libs/rdbms/database/DBConnRef.php b/includes/libs/rdbms/database/DBConnRef.php index 7cb0604e51..eba1657f29 100644 --- a/includes/libs/rdbms/database/DBConnRef.php +++ b/includes/libs/rdbms/database/DBConnRef.php @@ -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() { -- 2.20.1