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'));
+}
