summaryrefslogtreecommitdiff
path: root/includes/installer/MysqlInstaller.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2012-05-03 13:01:35 +0200
committerPierre Schmitz <pierre@archlinux.de>2012-05-03 13:01:35 +0200
commitd9022f63880ce039446fba8364f68e656b7bf4cb (patch)
tree16b40fbf17bf7c9ee6f4ead25b16dd192378050a /includes/installer/MysqlInstaller.php
parent27cf83d177256813e2e802241085fce5dd0f3fb9 (diff)
Update to MediaWiki 1.19.0
Diffstat (limited to 'includes/installer/MysqlInstaller.php')
-rw-r--r--includes/installer/MysqlInstaller.php49
1 files changed, 19 insertions, 30 deletions
diff --git a/includes/installer/MysqlInstaller.php b/includes/installer/MysqlInstaller.php
index 0c197e6b..7585fe7a 100644
--- a/includes/installer/MysqlInstaller.php
+++ b/includes/installer/MysqlInstaller.php
@@ -32,7 +32,7 @@ class MysqlInstaller extends DatabaseInstaller {
public $supportedEngines = array( 'InnoDB', 'MyISAM' );
- public $minimumVersion = '4.0.14';
+ public $minimumVersion = '5.0.2';
public $webUserPrivs = array(
'DELETE',
@@ -75,8 +75,8 @@ class MysqlInstaller extends DatabaseInstaller {
$this->getTextBox( 'wgDBserver', 'config-db-host', array(), $this->parent->getHelpBox( 'config-db-host-help' ) ) .
Html::openElement( 'fieldset' ) .
Html::element( 'legend', array(), wfMsg( 'config-db-wiki-settings' ) ) .
- $this->getTextBox( 'wgDBname', 'config-db-name', array(), $this->parent->getHelpBox( 'config-db-name-help' ) ) .
- $this->getTextBox( 'wgDBprefix', 'config-db-prefix', array(), $this->parent->getHelpBox( 'config-db-prefix-help' ) ) .
+ $this->getTextBox( 'wgDBname', 'config-db-name', array( 'dir' => 'ltr' ), $this->parent->getHelpBox( 'config-db-name-help' ) ) .
+ $this->getTextBox( 'wgDBprefix', 'config-db-prefix', array( 'dir' => 'ltr' ), $this->parent->getHelpBox( 'config-db-prefix-help' ) ) .
Html::closeElement( 'fieldset' ) .
$this->getInstallUserBox();
}
@@ -113,6 +113,9 @@ class MysqlInstaller extends DatabaseInstaller {
if ( !$status->isOK() ) {
return $status;
}
+ /**
+ * @var $conn DatabaseBase
+ */
$conn = $status->value;
// Check version
@@ -154,11 +157,14 @@ class MysqlInstaller extends DatabaseInstaller {
$this->parent->showStatusError( $status );
return;
}
+ /**
+ * @var $conn DatabaseBase
+ */
$conn = $status->value;
$conn->selectDB( $this->getVar( 'wgDBname' ) );
# Determine existing default character set
- if ( $conn->tableExists( "revision" ) ) {
+ if ( $conn->tableExists( "revision", __METHOD__ ) ) {
$revision = $conn->buildLike( $this->getVar( 'wgDBprefix' ) . 'revision' );
$res = $conn->query( "SHOW TABLE STATUS $revision", __METHOD__ );
$row = $conn->fetchObject( $res );
@@ -207,18 +213,12 @@ class MysqlInstaller extends DatabaseInstaller {
* @return array
*/
public function getEngines() {
- $engines = array( 'InnoDB', 'MyISAM' );
$status = $this->getConnection();
- if ( !$status->isOK() ) {
- return $engines;
- }
- $conn = $status->value;
- $version = $conn->getServerVersion();
- if ( version_compare( $version, "4.1.2", "<" ) ) {
- // No SHOW ENGINES in this version
- return $engines;
- }
+ /**
+ * @var $conn DatabaseBase
+ */
+ $conn = $status->value;
$engines = array();
$res = $conn->query( 'SHOW ENGINES', __METHOD__ );
@@ -237,16 +237,7 @@ class MysqlInstaller extends DatabaseInstaller {
* @return array
*/
public function getCharsets() {
- $status = $this->getConnection();
- $mysql5 = array( 'binary', 'utf8' );
- $mysql4 = array( 'mysql4' );
- if ( !$status->isOK() ) {
- return $mysql5;
- }
- if ( version_compare( $status->value->getServerVersion(), '4.1.0', '>=' ) ) {
- return $mysql5;
- }
- return $mysql4;
+ return array( 'binary', 'utf8' );
}
/**
@@ -259,13 +250,11 @@ class MysqlInstaller extends DatabaseInstaller {
if ( !$status->isOK() ) {
return false;
}
+ /**
+ * @var $conn DatabaseBase
+ */
$conn = $status->value;
- // Check version, need INFORMATION_SCHEMA and CREATE USER
- if ( version_compare( $conn->getServerVersion(), '5.0.2', '<' ) ) {
- return false;
- }
-
// Get current account name
$currentName = $conn->selectField( '', 'CURRENT_USER()', '', __METHOD__ );
$parts = explode( '@', $currentName );
@@ -637,7 +626,7 @@ class MysqlInstaller extends DatabaseInstaller {
# MySQL table options to use during installation or update
\$wgDBTableOptions = \"{$tblOpts}\";
-# Experimental charset support for MySQL 4.1/5.0.
+# Experimental charset support for MySQL 5.0.
\$wgDBmysql5 = {$dbmysql5};";
}
}