Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-43447

We cannot rely on ORDER BY id

XMLWordPrintable

    • Icon: Epic Epic
    • Resolution: Won't Do
    • Icon: Critical Critical
    • None
    • 2.6
    • Database SQL/XMLDB
    • MOODLE_26_STABLE
    • Stop ORDER BY id

      It seems that, once you have master-master replication, you cannot assume that ORDER BY id means anything.

      Sadly, various bits of Moodle code rely on it. Try searching for

      • ORDER BY id - 14 matches in core
      • get_record.*\s["']id['"] - 190 matches in core, but no all relevant.

      The situation seems to be:

      So, the only viable long-term solution is to remove all ORDER BY id, but that will be a big job, so I expect this will have to become an Epic in due course, in order to add appropriate developer debug warnings, and then find and fix all problems.

      Long chat log discussion here: https://moodle.org/local/chatlogs/index.php?conversationid=14503#c520410

      The issue that triggered all this: MDL-43246

            Unassigned Unassigned
            timhunt Tim Hunt
            Votes:
            1 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved:

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