• Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: Major Major
    • 1.9
    • 1.9
    • Roles / Access
    • 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

            martinlanghoff Martín Langhoff
            dougiamas Martin Dougiamas
            Nobody Nobody
            Votes:
            2 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.