Commit c128aae6 authored by Dries's avatar Dries

- Patch #43588 by killes: improved performance of taxonomy_get_tree.

parent 6597a94f
......@@ -22,6 +22,7 @@ Drupal x.x.x, xxxx-xx-xx (development version)
* made it possible to alter, extend or theme forms.
- comment system:
* added support for "mass comment operations" to ease repetitive tasks.
* comment moderation has been removed.
- node system:
* reworked the revision functionality.
- upgrade system:
......
......@@ -712,7 +712,8 @@ CREATE TABLE term_hierarchy (
tid int(10) unsigned NOT NULL default '0',
parent int(10) unsigned NOT NULL default '0',
KEY tid (tid),
KEY parent (parent)
KEY parent (parent),
PRIMARY KEY (tid, parent)
) TYPE=MyISAM;
--
......
......@@ -705,7 +705,8 @@ CREATE INDEX term_data_vid_idx ON term_data(vid);
CREATE TABLE term_hierarchy (
tid integer NOT NULL default '0',
parent integer NOT NULL default '0'
parent integer NOT NULL default '0',
PRIMARY KEY (tid, parent)
);
CREATE INDEX term_hierarchy_tid_idx ON term_hierarchy(tid);
CREATE INDEX term_hierarchy_parent_idx ON term_hierarchy(parent);
......
......@@ -1421,3 +1421,11 @@ function system_update_167() {
return $ret;
}
function system_update_168() {
$ret = array();
$ret[] = update_sql("ALTER TABLE {term_hierarchy} ADD PRIMARY KEY (tid, parent)");
return $ret;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment