Postgres installation fixes
authorAaron Schulz <aschulz@wikimedia.org>
Mon, 17 Oct 2016 18:21:40 +0000 (11:21 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Mon, 17 Oct 2016 22:06:38 +0000 (15:06 -0700)
commit66b0ad56df146c74e531c0f89524398ee0ad3e5b
treec12370aaec0b076c7931a850f697823631864b1f
parentda49ad8e8c5331fa8a49fa0bbc626f14d49c5485
Postgres installation fixes

* Make isTransactableQuery() exclude CREATE/ALTER.
  Starting transactions for schema changes like this can cause
  errors as it is not supported for MySQL and some Postgres
  operations. Note that temporary tables are session-level,
  so they are not effected by this change.
* Clean up the transaction logic in determineCoreSchema()
  so a transaction is not left dangling.
* Fix broken getSchemaPath() call in PostgresInstaller.
* Avoid warnings in DatabasePostgres::closeConnection() if
  mConn is already unset.
* Commit master changes in doMaintenance.php before running
  deferred updates, just as MediaWiki.php does.
* Change E_WARNING to E_USER_WARNING to avoid notices in the
  default /rdbms error handlers.
* Also avoid trying to rollback in MWExceptionHandler if the
  LBFactory service is disabled, which just results in an error.

Bug: T147599
Change-Id: I64ccab7f9b74f60309ba0c9a8ce68337c42ffb0f
includes/exception/MWExceptionHandler.php
includes/installer/PostgresInstaller.php
includes/libs/rdbms/database/Database.php
includes/libs/rdbms/database/DatabaseMysqlBase.php
includes/libs/rdbms/database/DatabaseMysqli.php
includes/libs/rdbms/database/DatabasePostgres.php
includes/libs/rdbms/database/DatabaseSqlite.php
includes/libs/rdbms/lbfactory/LBFactory.php
includes/libs/rdbms/loadbalancer/LoadBalancer.php
maintenance/doMaintenance.php