Bug in unit tests with constraints in mysql
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Mahara version : 18.10
Database : MySQL
The unit tests fail to execute when using MySQL, because of an sql error due to constraints ("DROP CONSTRAINT" is not supported in MySQL).
In htdocs/
execute_sql('ALTER TABLE {lti_assessment} DROP CONSTRAINT {ltiasse_oau_fk}');
should be replaced by
if (is_mysql()) {
execute_
}
else {
execute_
}
and
execute_sql('ALTER TABLE {collection} DROP CONSTRAINT {coll_fra_fk}');
should be
if (is_mysql()) {
execute_
}
else {
execute_
}
The same logic is already used in the same file for other contraints. Maybe some indexes should be dropped also, not only the foreign key.
Changed in mahara: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
Changed in mahara: | |
status: | Confirmed → In Progress |
milestone: | none → 19.04.0 |
Changed in mahara: | |
status: | In Progress → Fix Committed |
Changed in mahara: | |
status: | Fix Committed → Fix Released |
Patch for "master" branch: https:/ /reviews. mahara. org/9399