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

Use nvarchar(max) instead of ntext for MSSQL 2005

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 1.8
    • Fix Version/s: 1.9
    • Component/s: Database SQL/XMLDB
    • Labels:
      None
    • Environment:
      MSSQL 2005
    • Database:
      Microsoft SQL
    • Affected Branches:
      MOODLE_18_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      See http://msdn2.microsoft.com/en-us/library/ms178158.aspx

      The main reason is that ntext fields can't be compared properly so queries with UNIONs fail (for example, the big query in get_my_courses in lib/datalib.php, you get an error message like "The ntext data type cannot be selected as DISTINCT because it is not comparable."). nvarchar(max) is new in MSSQL 2005, so it won't be compatible with earlier versions.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              skodak Petr Skoda
              Reporter:
              trick Alan Trick
              Participants:
              Component watchers:
              Andrew Nicols, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                3/Mar/08