Skip to content

Commit

Permalink
Fixes matomo-org#12002 and matomo-org#12030 - azure fallback to "sele…
Browse files Browse the repository at this point in the history
…ct @@Version"
  • Loading branch information
robocoder committed Apr 4, 2018
1 parent d9eef2a commit 22c0cd9
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
16 changes: 16 additions & 0 deletions core/Db/Adapter/Mysqli.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,22 @@ public function checkServerVersion()
}
}

/**
* Returns the MySQL server version
*
* @return null|string
*/
public function getServerVersion()
{
$versionInfo = $this->fetchAll('SELECT @@VERSION');

if (count($versionInfo)) {
return $versionInfo[0]['@@VERSION'];
}

return parent::getServerVersion();
}

/**
* Check client version compatibility against database server
*
Expand Down
16 changes: 16 additions & 0 deletions core/Db/Adapter/Pdo/Mysql.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,22 @@ public function checkServerVersion()
}
}

/**
* Returns the MySQL server version
*
* @return null|string
*/
public function getServerVersion()
{
$versionInfo = $this->fetchAll('SELECT @@VERSION');

if (count($versionInfo)) {
return $versionInfo[0]['@@VERSION'];
}

return parent::getServerVersion();
}

/**
* Check client version compatibility against database server
*
Expand Down

0 comments on commit 22c0cd9

Please sign in to comment.