From: jenkins-bot Date: Wed, 14 Mar 2018 09:57:18 +0000 (+0000) Subject: Merge "rdbms: allow construction of Database objects without connecting" X-Git-Tag: 1.31.0-rc.0~386 X-Git-Url: http://git.cyclocoop.org/%22.%24redirect_annul.%22?a=commitdiff_plain;h=ebf1570fd1ad7a9fc732e8dfdedcbc540c4a8ec6;p=lhc%2Fweb%2Fwiklou.git Merge "rdbms: allow construction of Database objects without connecting" --- ebf1570fd1ad7a9fc732e8dfdedcbc540c4a8ec6 diff --cc includes/libs/rdbms/database/Database.php index 3b929d5a35,8596690411..53cf55caf1 --- a/includes/libs/rdbms/database/Database.php +++ b/includes/libs/rdbms/database/Database.php @@@ -68,18 -74,16 +74,18 @@@ abstract class Database implements IDat protected $lastWriteTime = false; /** @var string|bool */ protected $phpError = false; - /** @var string */ + /** @var string Server that this instance is currently connected to */ protected $server; - /** @var string */ + /** @var string User that this instance is currently connected under the name of */ protected $user; - /** @var string */ + /** @var string Password used to establish the current connection */ protected $password; - /** @var string */ + /** @var string Database that this instance is currently connected to */ protected $dbName; - /** @var array[] $aliases Map of (table => (dbname, schema, prefix) map) */ + /** @var array[] Map of (table => (dbname, schema, prefix) map) */ protected $tableAliases = []; + /** @var string[] Map of (index alias => index) */ + protected $indexAliases = []; /** @var bool Whether this PHP instance is for a CLI script */ protected $cliMode; /** @var string Agent name for query profiling */ @@@ -3901,18 -3903,6 +3939,10 @@@ $this->tableAliases = $aliases; } + public function setIndexAliases( array $aliases ) { + $this->indexAliases = $aliases; + } + - /** - * @return bool Whether a DB user is required to access the DB - * @since 1.28 - */ - protected function requiresDatabaseUser() { - return true; - } - /** * Get the underlying binding connection handle *