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

Incorrect usage of SELECT DISTINCT from TEXT fields

    Details

    • Type: Bug
    • Status: Closed
    • Priority: 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

      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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              skodak Petr Skoda added a comment -

              Should be fixed now, thanks!

              Show
              skodak Petr Skoda 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:
                    Fix Release Date:
                    25/Dec/10