summaryrefslogtreecommitdiff
path: root/includes/database/mysql
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-04-25 16:57:19 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-04-25 16:57:19 +0000
commit2671e98daa4ad2ec590a3e0fd30c0bb053dabd3f (patch)
tree9f59ca3307fe028f1a1b12d4f854c2510db99385 /includes/database/mysql
parent96ca81fb00b58fc17ac72a909ea666d8b8bc96e9 (diff)
downloadbrdo-2671e98daa4ad2ec590a3e0fd30c0bb053dabd3f.tar.gz
brdo-2671e98daa4ad2ec590a3e0fd30c0bb053dabd3f.tar.bz2
#301362 by moshe weitzman, David Strauss, Narayan Newton, and chx: Default to InnoDB in MySQL.
Diffstat (limited to 'includes/database/mysql')
-rw-r--r--includes/database/mysql/schema.inc10
1 files changed, 6 insertions, 4 deletions
diff --git a/includes/database/mysql/schema.inc b/includes/database/mysql/schema.inc
index aa0905a35..ff380ba9d 100644
--- a/includes/database/mysql/schema.inc
+++ b/includes/database/mysql/schema.inc
@@ -59,9 +59,11 @@ class DatabaseSchema_mysql extends DatabaseSchema {
* An array of SQL statements to create the table.
*/
protected function createTableSql($name, $table) {
- if (empty($table['mysql_suffix'])) {
- $table['mysql_suffix'] = 'DEFAULT CHARACTER SET UTF8';
- }
+ // Provide some defaults if needed
+ $table += array(
+ 'mysql_engine' => 'InnoDB',
+ 'mysql_character_set' => 'UTF8',
+ );
$sql = "CREATE TABLE {" . $name . "} (\n";
@@ -79,7 +81,7 @@ class DatabaseSchema_mysql extends DatabaseSchema {
// Remove the last comma and space.
$sql = substr($sql, 0, -3) . "\n) ";
- $sql .= $table['mysql_suffix'];
+ $sql .= 'ENGINE = ' . $table['mysql_engine'] . ' DEFAULT CHARACTER SET ' . $table['mysql_character_set'];
// Add table comment.
if (!empty($table['description'])) {