-
Bug
-
Resolution: Fixed
-
Minor
-
3.3.5, 3.3.6
-
MOODLE_33_STABLE
-
MOODLE_34_STABLE, MOODLE_35_STABLE
-
MDL-62867-missing_colon_in_query -
Easy
-
A missing colon in query placeholder in the function "add_item_tag" of "core_tag_tag" class causes performance issues in sites with a lot of tags when create or restore a backup with tags.
In this query, the itemid must have a colon.
$ordering = $DB->get_field_sql('SELECT MAX(ordering) FROM {tag_instance} ti
|
WHERE ti.itemtype = :itemtype AND ti.itemid = itemid AND
|
ti.component = :component' . $usersql, $params);
|
They should be:
$ordering = $DB->get_field_sql('SELECT MAX(ordering) FROM {tag_instance} ti
|
WHERE ti.itemtype = :itemtype AND ti.itemid = :itemid AND
|
ti.component = :component' . $usersql, $params);
|