diff --git a/core/lib/Drupal/Core/Database/Schema.php b/core/lib/Drupal/Core/Database/Schema.php
index 7618a7c..ad4d3cd 100644
--- a/core/lib/Drupal/Core/Database/Schema.php
+++ b/core/lib/Drupal/Core/Database/Schema.php
@@ -167,6 +167,18 @@
 
 abstract class Schema implements PlaceholderInterface {
 
+  /**
+   * The maximum allowed length of a database index.
+   *
+   * The MySQL MyISAM storage engine enforces a limit of 1000 bytes, which
+   * corresponds to 333 UTF-8 characters. We enforce this limitation for all
+   * schemata, so that it is not possible to inadvertently declare a schema
+   * that is not compatible with MySQL.
+   *
+   * @see http://dev.mysql.com/doc/refman/5.6/en/myisam-storage-engine.html
+   */
+  const MAX_INDEX_LENGTH = 333;
+
   protected $connection;
 
   /**
@@ -661,6 +673,7 @@ public function createTable($name, $table) {
     if ($this->tableExists($name)) {
       throw new SchemaObjectExistsException(t('Table @name already exists.', array('@name' => $name)));
     }
+    $this->validateTable($name, $table);
     $statements = $this->createTableSql($name, $table);
     foreach ($statements as $statement) {
       $this->connection->query($statement);
@@ -668,6 +681,56 @@ public function createTable($name, $table) {
   }
 
   /**
+   * Validates a table definition.
+   *
+   * @param string $name
+   *   The name of the table.
+   * @param array $table
+   *   A Schema API table definition array.
+   *
+   * @throws Drupal\Core\Database\SchemaIndexLengthException
+   *   If a specified index is too long.
+   *
+   * @see \Drupal\Core\Database\Schema::addIndex()
+   */
+  public function validateTable($name, array $table) {
+    $spec = array_intersect_key($table, array('unique keys' => 1, 'indexes' => 1));
+    if (isset($table['primary key'])) {
+      $spec['primary key'] = array('primary key' => $table['primary key']);
+    }
+    foreach ($spec as $type => $keys) {
+      foreach ($keys as $name => $fields) {
+        $length = 0;
+        foreach ($fields as $field) {
+          // If just the field name is provided, the whole field is used for
+          // the index, so add its total length.
+          if (is_string($field)) {
+            // @todo What's the length of fields that don't have a length?
+            // Also, INT columns?
+            if (isset($table['fields'][$field]['length'])) {
+              $length += $table['fields'][$field]['length'];
+            }
+          }
+          // Otherwise, if the field is an array, then the first key of the
+          // array is the field name, and the second is the length used in the
+          // index, e.g. array('my_field', 64)
+          // See \Drupal\Core\Database\Driver\mysql\Schema::createKeySql().
+          else {
+            $length += $field[1];
+          }
+        }
+        if ($length > self::MAX_INDEX_LENGTH) {
+          throw new SchemaIndexLengthException(format_string('Table index @name is too long. Found @length characters (exceeds maximum of @max).', array(
+            '@name' => $name,
+            '@length' => $length,
+            '@max' => self::MAX_INDEX_LENGTH,
+          )));
+        }
+      }
+    }
+  }
+
+  /**
    * Return an array of field names from an array of key/index column specifiers.
    *
    * This is usually an identity function but if a key/index uses a column prefix
diff --git a/core/lib/Drupal/Core/Database/SchemaIndexLengthException.php b/core/lib/Drupal/Core/Database/SchemaIndexLengthException.php
new file mode 100644
index 0000000..b223353
--- /dev/null
+++ b/core/lib/Drupal/Core/Database/SchemaIndexLengthException.php
@@ -0,0 +1,15 @@
+<?php
+
+/**
+ * @file
+ * Contains Drupal\Core\Database\SchemaIndexLengthException.
+ */
+
+namespace Drupal\Core\Database;
+
+/**
+ * Exception thrown if a schema contains an index that is too long.
+ *
+ * @see Drupal\Core\Database\Schema::MAX_INDEX_LENGTH
+ */
+class SchemaIndexLengthException extends SchemaException implements DatabaseException { }
diff --git a/core/modules/taxonomy/taxonomy.install b/core/modules/taxonomy/taxonomy.install
index 4ad0773..767ac28 100644
--- a/core/modules/taxonomy/taxonomy.install
+++ b/core/modules/taxonomy/taxonomy.install
@@ -85,8 +85,8 @@ function taxonomy_schema() {
       'uuid' => array('uuid'),
     ),
     'indexes' => array(
-      'taxonomy_tree' => array('vid', 'weight', 'name'),
-      'vid_name' => array('vid', 'name'),
+      'taxonomy_tree' => array(array('vid', 64), 'weight', 'name'),
+      'vid_name' => array(array('vid', 64), 'name'),
       'name' => array('name'),
     ),
   );
@@ -332,3 +332,13 @@ function taxonomy_update_8006() {
       ->execute();
   }
 }
+
+/**
+ * Change {taxonomy_term_data} indexes.
+ */
+function taxonomy_update_8007() {
+  db_drop_index('taxonomy_term_data', 'taxonomy_tree');
+  db_drop_index('taxonomy_term_data', 'vid_name');
+  db_add_index('taxonomy_term_data', 'taxonomy_tree', array(array('vid', 64), 'weight', 'name'));
+  db_add_index('taxonomy_term_data', 'vid_name', array(array('vid', 64), 'name'));
+}
