Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.8, 1.9
-
Component/s: Database SQL/XMLDB
-
Labels:None
-
Database:Microsoft SQL
-
Affected Branches:MOODLE_18_STABLE, MOODLE_19_STABLE
-
Fixed Branches:MOODLE_18_STABLE, MOODLE_19_STABLE
Description
The parser built into the mssql_n driver has one bug, causing the "N" char not being positioned at the beginning of the resulting string, so, for example, the string:
'''hello' (3 single quotes + hello + 1 single quote)
is being converted to:
''N'hello' (2 single quotes + N + 1 single quote + hello + 1 single quote)
that breaks the SQL execution: it should be:
N'''hello' (N + 3 single quotes + hello + 1 single quote)