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

InnoDB Page Compression causes table creation to fail

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.9
    • Fix Version/s: None
    • Component/s: Database SQL/XMLDB
    • Labels:

      Description

      If InnoDB Page Compression is ON (https://mariadb.com/kb/en/innodb-page-compression/) for host database, Moodle install and upgrade scripts fail because page compression and row compression are mutually exclusive.

      Page Compression is being used as a database optimization technique in a SSD storage based installation that supports sparse files.  After successfully optimizing our Moodle 3.8x database using this technique, upgrading to Moodle 3.9 stable release failed when trying to create a new table (contentbank_content) with the ddl sql error 'wrong create options'.

      Researching the issue revealed /lib/dml/mysqli_native_moodle_database.php function is_compressed_row_format_supported($cached = true) does not test if page compression is active - and thus wrongfully asserts that compressedrowformatsupported = true.

      In an effort to confirm my hypothesis (and resolve my database migration issue), I created a patch that tests for innodb_compression_default = ON, and if true, returns compressedrowformatsupported = false.

      To reproduce the issue, modify the database config file to include: (assuming mariadb here)
      [mariadb]
      innodb_compression_default=ON

      I will share the patch (once I figure out how to share it) and would ask that it (or some derivative thereof) be included in the source to resolve this issue for me and others.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            jhbsa jhbsa
            Participants:
            Component watchers:
            Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: