mirrored from git://git.moodle.org/moodle.git
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDL-35155 database: better sql_substr() impl. for mssql/sqlsrv + unit…
… tests MSSQL's substring() implementation is somehow silly/strict and unable to perform implicit casts to integer both for the start and length parameters. This hits Moodle badly because of another problems (MDL-23997) we decided to cast to string all bound placeholders long ago. So this commit just enforces the cast of the start and length parameters to integer. And includes unit tests for using placeholders on all positions in the sql_substr() method.
- Loading branch information
Showing
3 changed files
with
28 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters