From 4f2d69698c849e4e20ad5ae92b0652654a88f840 Mon Sep 17 00:00:00 2001 From: Dries Buytaert <dries@buytaert.net> Date: Fri, 30 Jul 2010 01:59:14 +0000 Subject: [PATCH] - Patch #861192 by jhodgdon, chx, sun, David_Rothstein: document that MariaDB works, too. --- INSTALL.txt | 13 ++++++++----- includes/database/mysql/install.inc | 18 ++++++++++++++---- includes/install.core.inc | 2 +- includes/install.inc | 12 ++++++------ 4 files changed, 29 insertions(+), 16 deletions(-) diff --git a/INSTALL.txt b/INSTALL.txt index 86b1a7fbf594..0e00a0e77a74 100644 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -16,11 +16,14 @@ REQUIREMENTS Drupal requires: - - a web server, Apache (version 2.0 or greater) is recommended, - - PHP 5 (5.2.0 or greater) (http://www.php.net/), - - and either MySQL (5.0.15 or greater) (http://www.mysql.com/), PostgreSQL (8.3 - or greater) (http://www.postgresql.org/), or SQLite (3.4.2 or greater) - (http://www.sqlite.org/). +- A web server. Apache (version 2.0 or greater) is recommended. +- PHP 5.2.0 (or greater) (http://www.php.net/). +- One of the following databases: + - MySQL 5.0.15 (or greater) (http://www.mysql.com/). + - MariaDB 5.1.44 (or greater) (http://mariadb.org/). MariaDB is a fully + compatible drop-in replacement for MySQL. + - PostgreSQL 8.3 (or greater) (http://www.postgresql.org/). + - SQLite 3.4.2 (or greater) (http://www.sqlite.org/). For more detailed information about Drupal requirements, including a list of PHP extensions and configurations that are required, see "System requirements" diff --git a/includes/database/mysql/install.inc b/includes/database/mysql/install.inc index f443944d8b59..59320f4f7675 100644 --- a/includes/database/mysql/install.inc +++ b/includes/database/mysql/install.inc @@ -6,13 +6,23 @@ * Installation code for MySQL embedded database engine. */ - -// MySQL specific install functions - +/** + * Specifies installation tasks for MySQL and equivalent databases. + */ class DatabaseTasks_mysql extends DatabaseTasks { + + /** + * The PDO driver name for MySQL and equivalent databases. + * + * @var string + */ protected $pdoDriver = 'mysql'; + + /** + * Returns a human-readable name string for MySQL and equivalent databases. + */ public function name() { - return 'MySQL'; + return 'MySQL, MariaDB, or equivalent'; } } diff --git a/includes/install.core.inc b/includes/install.core.inc index 4e6470836de5..443ec8aa4ffa 100644 --- a/includes/install.core.inc +++ b/includes/install.core.inc @@ -858,7 +858,7 @@ function install_settings_form($form, &$form_state, &$install_state) { ); if (count($drivers) == 1) { $form['driver']['#disabled'] = TRUE; - $form['driver']['#description'] .= ' ' . st('Your PHP configuration only supports the %driver database type so it has been automatically selected.', array('%driver' => current($drivers))); + $form['driver']['#description'] .= ' ' . st('Your PHP configuration only supports a single database type, so it has been automatically selected.'); } // Database name. diff --git a/includes/install.inc b/includes/install.inc index 8626b04f9fcd..40b352df5600 100644 --- a/includes/install.inc +++ b/includes/install.inc @@ -278,7 +278,7 @@ abstract class DatabaseTasks { 'arguments' => array( 'CREATE TABLE drupal_install_test (id int NULL)', 'Drupal can use CREATE TABLE database commands.', - 'Failed to <strong>CREATE</strong> a test table on your %name database server with the command %query. %name reports the following message: %error.<p>Are you sure the configured username has the necessary %name permissions to create tables in the database?</p>', + 'Failed to <strong>CREATE</strong> a test table on your database server with the command %query. The server reports the following message: %error.<p>Are you sure the configured username has the necessary permissions to create tables in the database?</p>', TRUE, ), ), @@ -286,28 +286,28 @@ abstract class DatabaseTasks { 'arguments' => array( 'INSERT INTO drupal_install_test (id) VALUES (1)', 'Drupal can use INSERT database commands.', - 'Failed to <strong>INSERT</strong> a value into a test table on your %name database server. We tried inserting a value with the command %query and %name reported the following error: %error.', + 'Failed to <strong>INSERT</strong> a value into a test table on your database server. We tried inserting a value with the command %query and the server reported the following error: %error.', ), ), array( 'arguments' => array( 'UPDATE drupal_install_test SET id = 2', 'Drupal can use UPDATE database commands.', - 'Failed to <strong>UPDATE</strong> a value in a test table on your %name database server. We tried updating a value with the command %query and %name reported the following error: %error.', + 'Failed to <strong>UPDATE</strong> a value in a test table on your database server. We tried updating a value with the command %query and the server reported the following error: %error.', ), ), array( 'arguments' => array( 'DELETE FROM drupal_install_test', 'Drupal can use DELETE database commands.', - 'Failed to <strong>DELETE</strong> a value from a test table on your %name database server. We tried deleting a value with the command %query and %name reported the following error: %error.', + 'Failed to <strong>DELETE</strong> a value from a test table on your database server. We tried deleting a value with the command %query and the server reported the following error: %error.', ), ), array( 'arguments' => array( 'DROP TABLE drupal_install_test', 'Drupal can use DROP TABLE database commands.', - 'Failed to <strong>DROP</strong> a test table from your %name database server. We tried dropping a table with the command %query and %name reported the following error %error.', + 'Failed to <strong>DROP</strong> a test table from your database server. We tried dropping a table with the command %query and the server reported the following error %error.', ), ), ); @@ -394,7 +394,7 @@ protected function connect() { $this->pass('Drupal can CONNECT to the database ok.'); } catch (Exception $e) { - $this->fail(st('Failed to connect to your %name database server. %name reports the following message: %error.<ul><li>Is the database server running?</li><li>Does the database exist, and have you entered the correct database name?</li><li>Have you entered the correct username and password?</li><li>Have you entered the correct database hostname?</li></ul>', array('%error' => $e->getMessage(), '%name' => $this->name()))); + $this->fail(st('Failed to connect to your database server. The server reports the following message: %error.<ul><li>Is the database server running?</li><li>Does the database exist, and have you entered the correct database name?</li><li>Have you entered the correct username and password?</li><li>Have you entered the correct database hostname?</li></ul>', array('%error' => $e->getMessage()))); return FALSE; } return TRUE; -- GitLab