-
Bug
-
Resolution: Fixed
-
Blocker
-
3.7.1
-
MOODLE_37_STABLE
-
MOODLE_36_STABLE, MOODLE_37_STABLE
-
MDL-66110-master -
-
-
2
-
Sprint 4 - Road to Redemption
When trying to upgrade from version 3.3 to 3.7.1, we get an error:
Default exception handler: Error reading from database Debug: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'groups g
ON mc.itemid = g.id
WHERE mc.compo' at line 3
SELECT mc.id
FROM message_conversations mc
LEFT JOIN groups g
ON mc.itemid = g.id
WHERE mc.component = ?
AND mc.itemtype = ?
AND g.id is NULL
[array (
0 => 'core_group',
1 => 'groups',
)]
Error code: dmlreadexception
- line 486 of \lib\dml\moodle_database.php: dml_read_exception thrown
- line 1245 of \lib\dml\mysqli_native_moodle_database.php: call to moodle_database->query_end()
- line 2743 of \lib\db\upgrade.php: call to mysqli_native_moodle_database->get_records_sql()
- line 1809 of \lib\upgradelib.php: call to xmldb_main_upgrade()
- line 518 of \admin\index.php: call to upgrade_core()
Probable reason in the keyword "GROUPS" - from version MySQL 8.0.2 this word is reserved and forbidden by standard SQL as column or table names (https://dev.mysql.com/doc/refman/8.0/en/keywords.html)