While upgrading moodle from 1.9 to 2.0 I got this error during the course conversion (I mean during upgrading Moodle database from version 1.9.16+ (Build: 20120127) (2010061900.08) to 2.0.9 (Build: 20120514) (2011033009)
SELECT DISTINCT c.id AS courseid, ra.enrol, c.timecreated, c.timemodified
FROM mdl_course c
JOIN mdl_context ctx ON (ctx.instanceid = c.id AND ctx.contextlevel = 50)
JOIN mdl_role_assignments ra ON (ra.contextid = ctx.id AND ra.enrol <> '')
LEFT JOIN mdl_enrol e ON (e.courseid = c.id AND e.enrol = ra.enrol)
WHERE c.id <> ? AND e.id IS NULL
[array (
0 => '1',
)]
- line 391 of /lib/dml/moodle_database.php: dml_read_exception thrown
- line 768 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
- line 4093 of /lib/db/upgrade.php: call to mysqli_native_moodle_database->get_recordset_sql()
- line 1393 of /lib/upgradelib.php: call to xmldb_main_upgrade()
- line 273 of /admin/index.php: call to upgrade_core()
httpd debug log:
Default exception handler: Error reading from database Debug: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation '='\nSELECT DISTINCT c.id AS courseid, ra.enrol, c.timecreated, c.timemodified\n FROM mdl_course c\n JOIN mdl_context ctx ON (ctx.instanceid = c.id AND ctx.contextlevel = 50)\n JOIN mdl_role_assignments ra ON (ra.contextid = ctx.id AND ra.enrol <> '')\n LEFT JOIN mdl_enrol e ON (e.courseid = c.id AND e.enrol = ra.enrol)\n WHERE c.id <> ? AND e.id IS NULL\n[array (\n 0 => '1',\n)]\n* line 391 of /lib/dml/moodle_database.php: dml_read_exception thrown\n* line 768 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()\n* line 4093 of /lib/db/upgrade.php: call to mysqli_native_moodle_database->get_recordset_sql()\n* line 1393 of /lib/upgradelib.php: call to xmldb_main_upgrade()\n* line 273 of /admin/index.php: call to upgrade_core()\n, referer: http://moodletest/moodle/admin/index.php?confirmupgrade=1&confirmrelease=1