Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-11180 19PERF META BUG: Inspect and merge Catalyst accesslib improvements into HEAD
  3. MDL-11172

19PERF: MySQL syntax error when listing "Available courses" on home page

    XMLWordPrintable

Details

    • Sub-task
    • Status: Closed
    • Minor
    • Resolution: Cannot Reproduce
    • 1.9
    • 1.9
    • Performance
    • None
    • MySQL
    • MOODLE_19_STABLE
    • MOODLE_19_STABLE

    Description

      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 ') ) AND ra.roleid IN (3) AND c.categ' at line 15

      SELECT ctx.path, ctx.instanceid, ctx.contextlevel, ra.hidden, r.id AS roleid, r.name as rolename, u.id AS userid, u.firstname, u.lastname FROM mdl_role_assignments ra JOIN mdl_context ctx ON ra.contextid = ctx.id JOIN mdl_user u ON ra.userid = u.id JOIN mdl_role r ON ra.roleid = r.id LEFT OUTER JOIN mdl_course c ON (ctx.instanceid=c.id AND ctx.contextlevel=50) WHERE ( c.id IS NOT NULL OR ra.contextid IN () ) AND ra.roleid IN (3) AND c.category = 1 ORDER BY r.sortorder ASC, ctx.contextlevel ASC, ra.sortorder ASC

      • line 677 of lib/dmllib.php: call to debugging()
      • line 751 of lib/datalib.php: call to get_recordset_sql()
      • line 1766 of course/lib.php: call to get_courses_wmanagers()
      • line 227 of index.php: call to print_courses()

      The key thing is this: ra.contextid IN ()

      Attachments

        Activity

          People

            martinlanghoff Martín Langhoff
            dougiamas Martin Dougiamas
            Nobody Nobody
            Matteo Scaramuccia, Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              3/Mar/08