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

missing space is sql query

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.9.4
    • Fix Version/s: 1.9.5
    • Component/s: Database SQL/XMLDB, Unknown
    • Labels:
      None
    • Environment:
      MSSQL
    • Database:
      Microsoft SQL
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      Line 448 on /user/index.php (http://cvs.moodle.org/moodle/user/index.php?annotate=1.194.2.20#l448) is missing spaces between the LIKE and the strings (i.e. LIKE'%foo%'). On MSSQL, XMLDB transforms '%foo%' to N'%foo%'. The result is LIKEN'%foo%' which causes an error.

      One solution would be to ad spaces in that line. A more general solution would be to update XMLDB so that "'%foo%'" is transformed to " N'%foo%'" (note the space).

        Attachments

          Activity

            People

            • Assignee:
              skodak Petr Skoda
              Reporter:
              trick Alan Trick
              Tester:
              Sam Hemelryk
              Participants:
              Component watchers:
              Jake Dallimore, Jun Pataleta, Ryan Wyllie, Amaia Anabitarte, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                13/May/09