Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.9
    • 1.9
    • Roles / Access
    • None
    • MOODLE_19_STABLE
    • MOODLE_19_STABLE

    Description

      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

      Attachments

        Issue Links

          Activity

            People

              martinlanghoff Martín Langhoff
              dougiamas Martin Dougiamas
              Nobody Nobody
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              2 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                3/Mar/08