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

Support AWS Aurora, currently row_format=compressed causes Moodle installation to fail

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Testing this improvement requires a functional Moodle environment on Amazon Web Services. You will need an RDS instance with the Amazon Aurora engine and MySQL 5.7 compatibility, and an EC2 instance with the Moodle codebase and this patch.

      1. Set the dbtype in config.php to auroramysql.
      2. Run the full PHPUnit suite and verify that tests pass.
      3. Run the full Behat test suite and verify that tests pass.
      Show
      Testing this improvement requires a functional Moodle environment on Amazon Web Services. You will need an RDS instance with the Amazon Aurora engine and MySQL 5.7 compatibility, and an EC2 instance with the Moodle codebase and this patch. Set the dbtype in config.php to auroramysql. Run the full PHPUnit suite and verify that tests pass. Run the full Behat test suite and verify that tests pass.
    • Difficulty:
      Moderate
    • Affected Branches:
      MOODLE_33_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
    • Fixed Branches:
      MOODLE_40_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-58931-master

      Description

      Hello, I was trying to install Moodle 3.3 today and I couldn't. I was getting the error below

       

       

      Debug info:
       Index column size too large. The maximum column size is 767 bytes.
      CREATE TABLE mdl_config (
      id BIGINT(10) NOT NULL auto_increment,
      name VARCHAR(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
      value LONGTEXT COLLATE utf8mb4_unicode_ci NOT NULL,
      CONSTRAINT PRIMARY KEY (id)
      , UNIQUE KEY mdl_conf_nam_uix (name)
      )
      ENGINE = InnoDB
      DEFAULT COLLATE = utf8mb4_unicode_ci ROW_FORMAT=Compressed
      COMMENT='Moodle configuration variables'
      ;
      CREATE TABLE mdl_config_plugins (
      id BIGINT(10) NOT NULL auto_increment,
      plugin VARCHAR(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'core',
      name VARCHAR(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
      value LONGTEXT COLLATE utf8mb4_unicode_ci NOT NULL,
      CONSTRAINT PRIMARY KEY (id)
      , UNIQUE KEY mdl_confplug_plunam_uix (plugin, name)
      )
      ENGINE = InnoDB
      DEFAULT COLLATE = utf8mb4_unic
      

       

      I am using AWS Aurora as my DB Engine

      After some investigation and internet searching I found out that the problem is

      row_format=compressed

      I followed the Moodle guides to make all the necessary changes for the new Barracuda file format, all the settings below are applied

       

      default-character-set = utf8mb4 
      innodb_file_format = Barracuda 
      innodb_file_per_table = 1 
      innodb_large_prefix 
      character-set-client-handshake = FALSE
      character-set=server= utf8mb4
      collation-server = utf8mb4_unicode_ci 
       
      default-character-set = utf8mb4
      

       

       

      Even though innodb_large_prefix  is enabled I still get the error. I am not sure if this is AWS Aurora specific but I would like to know if there is a way to be fixed.

       

      I also tried to create the table manually, and when I changed the row_format=compressed to row_format=dynamic I managed to create the table.

       

      Thanks for your time.

      Christos

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              cfulton Charles Fulton
              Reporter:
              christos312 christos
              Peer reviewer:
              Simey Lameze
              Integrator:
              Eloy Lafuente (stronk7)
              Tester:
              Eloy Lafuente (stronk7)
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              16 Vote for this issue
              Watchers:
              25 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 day, 16 minutes
                  1d 16m