Moodle
  1. Moodle
  2. MDL-25623

Incorrect usage of SELECT DISTINCT from TEXT fields

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0.1
    • Component/s: Enrolments
    • Labels:
      None
    • Database:
      Microsoft SQL, Oracle
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE
    • Rank:
      15696

      Description

      Hi Petr, yet another issue with SELECT DISTINCT combined with TEXT fields under Oracle/MSSQL was reported by fweiss in MDL-22910

      I have tracked it down to the code in enrol/meta/locallib.php in user_unenrolled() function:

              $sql = "SELECT DISTINCT e.*
                        FROM {enrol} e
      

      The table

      {enrol}

      contains customtext1 and customtext2 TEXT fields that can not be used in this query.

        Issue Links

          Activity

          Hide
          Petr Škoda added a comment -

          Should be fixed now, thanks!

          Show
          Petr Škoda added a comment - Should be fixed now, thanks!

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: