yiisoft/yii2 — pull request #4345 by mikejpeters (2014-07-17 18:06:03+00:00)
Title: Move isOldMssql function to Connection class

`QueryBuilder::isOldMssql()` reads a PDO attribute to get the database version, but some database drivers (e.g. dblib) do not support getting attributes and this causes an error:

Uncaught exception 'PDOException' with message 'SQLSTATE[IM001]: Driver does not support this function: driver does not support getting attributes' in ...

Moving `isOldMssql()` to the `Connection` class makes it easier to override in a subclass, allowing a person to simply return true if they know the database involved in the connection is an old version of MSSQL. I think that this function is more of an attribute of the connection then the query, so it makes more sense here anyway.