-
Sub-task
-
Resolution: Fixed
-
Major
-
1.9
-
None
-
MOODLE_19_STABLE
-
MOODLE_19_STABLE
build_context_path(true) is called from the upgrade to populate the context table.
This sort of SQL breaks MySQL:
(mysql): UPDATE mdl_context SET depth=it.pdepth+1, path=CONCAT(it.ppath,'/',id) FROM (SELECT c.id AS instanceid, pctx.path AS ppath, pctx.depth as pdepth FROM mdl_course c JOIN mdl_context pctx ON (c.category=pctx.instanceid AND pctx.contextlevel=40) WHERE c.id != 1) it WHERE contextlevel=50 AND mdl_context.instanceid=it.instanceid 1064: 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 'FROM (SELECT c.id AS instanceid, pctx.path AS ppath, ' at line 3
adodb_mysql._execute(UPDATE mdl_context
SET depth=it.pdepth+1, path=CONCAT(it.ppath,'/',id)
FROM (SELECT c.id AS in..., false) % line 891, file: adodb.inc.php
adodb_mysql.execute(UPDATE mdl_context
SET depth=it.pdepth+1, path=CONCAT(it.ppath,'/',id)
FROM (SELECT c.id AS in...) % line 89, file: dmllib.php
execute_sql(UPDATE mdl_context
SET depth=it.pdepth+1, path=CONCAT(it.ppath,'/',id)
FROM (SELECT c.id AS in..., true) % line 4479, file: accesslib.php
build_context_path(true) % line 8, file: test.php