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

InnoDB Page Compression causes table creation to fail

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Deferred
    • Icon: Minor Minor
    • None
    • 3.9
    • Database SQL/XMLDB
    • MySQL
    • MOODLE_39_STABLE
    • MDL-69196-master
    • Easy
    • Hide

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

      Table creation should succeed on initial install or version upgrade after patch is applied (and/or fail without patch applied.)

      (see attachment for example of failure message.)

      Show
      To reproduce the issue, modify the database config file to include: (assuming mariadb here) [mariadb] innodb_compression_default=ON Table creation should succeed on initial install or version upgrade after patch is applied (and/or fail without patch applied.) (see attachment for example of failure message.)

      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.

            Votes:
            4 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved:

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