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

InnoDB Page Compression causes table creation to fail

    XMLWordPrintable

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.9
    • None
    • Database SQL/XMLDB

    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

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jhbsa jhbsa
              Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Stevani Andolo
              Votes:
              4 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated: