-
Bug
-
Resolution: Fixed
-
Critical
-
2.8.6, 2.9.2
-
MySQL
-
MOODLE_28_STABLE, MOODLE_29_STABLE
-
MOODLE_28_STABLE, MOODLE_29_STABLE
-
MDL-51514_master -
We've run into an issue where the following query in grade_category::set_usedinaggregation() is causing deadlocks in MySQL using Innodb:
$sql = "UPDATE {grade_grades}
|
SET aggregationstatus = 'unknown',
|
aggregationweight = 0
|
WHERE userid = :userid
|
AND itemid IN ($itemssql)";
|
This method can be called many times during a regrade and therefore optimizing the query can result in a performance gain. We're providing a patch that optimizes the query in MySQL. According to my tests, Postgres' query planner already optimizes the original query.