-
Improvement
-
Resolution: Fixed
-
Major
-
3.9.1, 4.1
-
MariaDB
-
MySQL
-
MOODLE_39_STABLE, MOODLE_401_STABLE
-
MOODLE_402_STABLE
-
m42_
MDL-69581_Improve_MySQL_MariaDB_Server_Version_Detection_v3 -
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!
- has a non-specific relationship to
-
MDL-51080 upgrading on OS where mysql changed to mariadb does not give useful advice
- Closed
-
MDL-19711 Read/Write splitting of DB operations to support primary/replica database configurations
- Closed
-
MDL-54704 SSL-support for connection to Postgres and MySQL Database
- Closed
- has been marked as being related by
-
MDL-72535 Azure SQL version information - move env. checks to use COMPATIBILITY_LEVEL
- Open