Moodle

missing space is sql query

Details

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

Activity

Hide
Petr Škoda (skodak) added a comment -

fixed, thanks a lot

Show
Petr Škoda (skodak) added a comment - fixed, thanks a lot
Hide
Sam Hemelryk added a comment -

Thanks guys all good

Show
Sam Hemelryk added a comment - Thanks guys all good

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: