-
Bug
-
Resolution: Fixed
-
Major
-
2.7.5, 2.8.3, 2.9.1, 3.0
-
MOODLE_27_STABLE, MOODLE_28_STABLE, MOODLE_29_STABLE, MOODLE_30_STABLE
-
MOODLE_28_STABLE, MOODLE_29_STABLE
-
MDL-49293-master -
We have a major flaw in our mssql sql_concat_join function.
This works as expected:
SELECT 'X' + '-' + 'Y';
== Expected result: XY
== Actual result: XY
However, this does not:
SELECT 1 + '-' + 2;
== Expected result: 1-2
== Actual result: 3
We should be using the CONCAT() function:
SELECT CONCAT(1, '-', 2);
== Expected result: 1-2
== Actual result: 1-2
Unless we cast the integer to a string in this issue somehow (and we don't have a DML function to cast from int to string), then the fix for this is to actually CONCAT things in the CONCAT function. A pretty big change.
Thankfully the only uses of this are in the unit tests.
- has a non-specific relationship to
-
MDL-35155 Using a parameter in the $start argument in sql_substr() breaks in MSSQL
-
- Closed
-