Details
-
Type:
Improvement
-
Status: Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 3.9.1
-
Fix Version/s: None
-
Component/s: Database SQL/XMLDB, Installation
-
Labels:None
-
Environment:MariaDB
-
Database:MySQL
-
Testing Instructions:
-
Affected Branches:MOODLE_39_STABLE
-
Pull from Repository:
-
Pull Master Branch:m40_MDL-69581_Improve_MariaDB_Server_Version_Detection
Description
This isn't really a Moodle bug, but is something it may be worth considering trying to work around or mitigate by changing the way the version is checked. I discovered this while upgrading a Moodle 3.5 installation to 3.9.1, but it probably affects other versions as well.
The Azure managed instances of MairaDB wrongly reports it's version number when you connect by design! You can demonstrate this using the command line client to connect to the database, which gives the following output:
Â
Welcome to the MariaDB monitor. Commands end with ; or \g.
|
Your MySQL connection id is 64799
|
Server version: 5.6.42.0 MariaDB Server
|
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
|
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
|
MySQL [(none)]> SELECT @@version ;
|
+-----------------+
|
| @@version |
|
+-----------------+
|
| 10.2.32-MariaDB |
|
+-----------------+
|
1 row in set (0.01 sec)
|
Â
The initial connection reports 5.6.42.0, but a subsequent query of the version reports 10.2.32 (which is the correct version for this instance). This blocks the installation of Moodle 3.9 which (not unreasonably) only checks the version reported when the connection is made. The work around is to either mis-configure the database as MySQL (which allows version 5.6) or patch the minimum version of MariaDB allowed.
The inconsistency is documented by Microsoft here:
https://docs.microsoft.com/en-us/azure/mariadb/concepts-supported-versions
I have submitted a bug report to Microsoft, but the response was that I should change my software to work around their bug!