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

upgrading on OS where mysql changed to mariadb does not give useful advice

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.9.1, 3.0.3, 3.4.3, 3.5, 3.6
    • Fix Version/s: 3.4.4, 3.5.1
    • Component/s: Database SQL/XMLDB
    • Labels:
    • Testing Instructions:
      Hide

      Test

      • Start installing Moodle on a MariaDB server supported version while selecting mysqli as the DB driver
      • The Server checks should block the next stage, telling you that you have wrongly define the DB Type: Wrong $CFG->dbtype: you need to change it in your config.php file, from 'mysql' to 'mariadb'.

      Regressions

      • Start installing Moodle on a MySQL server supported version while selecting mysqli as the DB driver
      • The Server checks should go further to the next stage, w/o any blocking message
      Show
      Test Start installing Moodle on a MariaDB server supported version while selecting mysqli as the DB driver The Server checks should block the next stage, telling you that you have wrongly define the DB Type: Wrong $CFG->dbtype: you need to change it in your config.php file, from 'mysql' to 'mariadb'. Regressions Start installing Moodle on a MySQL server supported version while selecting mysqli as the DB driver The Server checks should go further to the next stage, w/o any blocking message
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_29_STABLE, MOODLE_30_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE
    • Fixed Branches:
      MOODLE_34_STABLE, MOODLE_35_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      m36_MDL-51080_MAriaDB_Wrong_DB_Type

      Description

      When upgrading Moodle, it checks the database version.

      Some OSes (at least Fedora and Ubuntu) have switched from MySql to MariaDB. Moodle supports both.

      But if moodle was configured to use mysql (installed in a prior OS version), the OS changes to MariaDB, and moodle doesn't, then moodle will fail to upgrade.

      This problem was reported at http://www.learnbydoingit.org/2015/01/moodle-version-5-5-31-required-running-5-5-5-10-0-x/
      with the fix: change dbtype to mariadb in config.php.

      WHAT ACTUALLY HAPPENS:
      Moodle's upgrade check gives only the error: "version 5.5.31 is required and you are running 5.5.5.10.0.20". This error leads to things like issue #45070 and not the fix in the blog.

      WHAT SHOULD HAPPEN: the mysql-version checking code should generate an explicit recommendation "please change dbtype to mariadb in config.php" if it detects -10. in the version string.

      STEPS TO REPRODUCE: install moodle-2.8 on an OS with mysql (say, fedora 18). Upgrade the OS to pick up maria db (say, fedora 19 or later). Upgrade Moodle. Hilarity ensues.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                2 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  9/Jul/18