Problem/Motivation
I have installed this module for the site which uses MSSQL database and it gives below error when trying to access /admin/reports/upgrade-status page
Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42000]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]'VERSION' is not a recognized built-in function name.: SELECT VERSION(); Array ( ) in Drupal\upgrade_status\Util\CorrectDbServerVersion->getDatabaseServerVersion() (line 92 of docroot\modules\contrib\upgrade_status\src\Util\CorrectDbServerVersion.php).
Steps to reproduce
Install the module and browse /admin/reports/upgrade-status page.
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3221850.patch | 575 bytes | gábor hojtsy |
Comments
Comment #2
gábor hojtsyHm, this was introduced in #3213533: Fix incorrect MariaDB version reports when used in Drupal 8. I see the default implementation of
version()usesconnection->getAttribute(\PDO::ATTR_SERVER_VERSION);, so no SQL query per say. We can IMHO just use theversion()method from the connection.Comment #3
gábor hojtsyComment #4
gábor hojtsyOk it at least does not break anything else. We don't have testing coverage for this due to the complexity of the testing matrix vs. the benefit, so this would need some manual testing. Thanks!
Comment #6
gábor hojtsyOk this does not seem to be getting the manual testing sitting in the queue, even though I think it would ideally need it, but I did not see a problem with it myself, so will get the manual testing after the fact now.