Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-69581

Azure hosted MariaDB and MySQL instances report the wrong version number

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • 4.2
    • 3.9.1, 4.1
    • MariaDB

      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!

            matteo Matteo Scaramuccia
            tim1mw Tim Williams
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Ilya Tregubov Ilya Tregubov
            CiBoT CiBoT
            Votes:
            4 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 41 minutes
                2h 41m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.