mirror of
https://github.com/moodle/moodle.git
synced 2025-08-09 02:46:40 +02:00
Merge branch 'w16_MDL-45098_m26_mariaenv' of https://github.com/skodak/moodle into MOODLE_26_STABLE
This commit is contained in:
commit
060c55b39a
1 changed files with 14 additions and 0 deletions
|
@ -74,6 +74,20 @@ class mariadb_native_moodle_database extends mysqli_native_moodle_database {
|
||||||
return 'mariadb';
|
return 'mariadb';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns database server info array
|
||||||
|
* @return array Array containing 'description' and 'version' info
|
||||||
|
*/
|
||||||
|
public function get_server_info() {
|
||||||
|
$version = $this->mysqli->server_info;
|
||||||
|
$matches = null;
|
||||||
|
if (preg_match('/^5\.5\.5-(10\..+)-MariaDB/i', $version, $matches)) {
|
||||||
|
// Looks like MariaDB decided to use these weird version numbers for better BC with MySQL...
|
||||||
|
$version = $matches[1];
|
||||||
|
}
|
||||||
|
return array('description'=>$this->mysqli->server_info, 'version'=>$version);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* It is time to require transactions everywhere.
|
* It is time to require transactions everywhere.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue