regarding emulate bounds hack in
"the emulate bounds hack .... we did something similar for sqlsrv/mysqli and there was some unit tests related to that. And my mssql test server was ALREADY passing them, so the tests perhaps aren't valid? Or perhaps it doesn't affect ALL mssql (freetds) drivers?...."
I'll look around to see what these other tests were (hopefully committed against
MDL-23997 or the mysqli bug) and check why they were passing.