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

CommentFileSizeAuthor
#2 3221850.patch575 bytesgábor hojtsy

Comments

rajeevgole created an issue. See original summary.

gábor hojtsy’s picture

Status: Active » Needs review
StatusFileSize
new575 bytes

Hm, this was introduced in #3213533: Fix incorrect MariaDB version reports when used in Drupal 8. I see the default implementation of version() uses connection->getAttribute(\PDO::ATTR_SERVER_VERSION);, so no SQL query per say. We can IMHO just use the version() method from the connection.

gábor hojtsy’s picture

Title: 'VERSION' is not a recognized built-in function name » 'VERSION' is not a recognized built-in function name on MSSQL
gábor hojtsy’s picture

Issue tags: +Needs manual testing

Ok 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!

  • f9528e7 committed on 8.x-3.x
    Issue #3221850 by Gábor Hojtsy, rajeevgole: 'VERSION' is not a...
gábor hojtsy’s picture

Status: Needs review » Fixed
Issue tags: -Needs manual testing

Ok 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.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.