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

Fix use of ORDER BY id in the messaging system

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.6.5, 2.7.2
    • 2.6.3, 2.7
    • Messages
    • 20
    • BACKEND Sprint 14

      TO PEER REVIEWER

      There are two diffs to review here, please comment on which you think is the better solution; or if you think neither of them are.

      Mark's: https://github.com/markn86/moodle/compare/master...MDL-45594_master
      Tim's: https://github.com/markn86/moodle/compare/master...MDL-45594_master_alt


      See MDL-35453.

      Problem lines of code:

      message
        lib.php (3 matches)
          715: SELECT mr1.useridto AS userid, MAX(mr1.id) AS mid
          721: SELECT mr2.useridfrom AS userid, MAX(mr2.id) AS mid
          732:  ORDER BY mr.id DESC"; 
          741: SELECT m1.useridto AS userid, MAX(m1.id) AS mid
          747: SELECT m2.useridfrom AS userid, MAX(m2.id) AS mid
          758:  ORDER BY m.id DESC"; 
          799:  ORDER BY mr.id DESC";//ordering by id should give the same result as ordering by timecreated but will be faster 
      

            markn Mark Nelson
            timhunt Tim Hunt
            Dan Poltawski Dan Poltawski
            Dan Poltawski Dan Poltawski
            Michael de Raadt Michael de Raadt
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

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