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

Upgrade to 3.3 fails because of very long index in auth_oauth2_linked_login on MySQL in utf8mb4_general_ci

XMLWordPrintable

    • MOODLE_33_STABLE

      Reported on forum https://moodle.org/mod/forum/discuss.php?d=352436

      I have not reproduced it yet, creating an issue for investigation

      Debug info: Specified key was too long; max key length is 767 bytes
      CREATE TABLE mdl_auth_oauth2_linked_login (
      id BIGINT(10) NOT NULL auto_increment,
      timecreated BIGINT(10) NOT NULL,
      timemodified BIGINT(10) NOT NULL,
      usermodified BIGINT(10) NOT NULL,
      userid BIGINT(10) NOT NULL,
      issuerid BIGINT(10) NOT NULL,
      username VARCHAR(255) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
      email LONGTEXT COLLATE utf8mb4_general_ci NOT NULL,
      confirmtoken VARCHAR(64) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
      confirmtokenexpires BIGINT(10),
      CONSTRAINT PRIMARY KEY (id)
      , KEY mdl_authoautlinklogi_iss_ix (issuerid, username)
      , KEY mdl_authoautlinklogi_use_ix (usermodified)
      , KEY mdl_authoautlinklogi_us2_ix (userid)
      , KEY mdl_authoautlinklogi_is2_ix (issuerid)
      , UNIQUE KEY mdl_authoautlinklogi_us_uix (userid, issuerid, username)
      )
      ENGINE = InnoDB
      DEFAULT COLLATE = utf8mb4_general_ci ROW_FORMAT=Dynamic
      COMMENT='Accounts linked to a users Moodle account.'
      Error code: ddlexecuteerror
      ×Stack trace:
       
          line 492 of /lib/dml/moodle_database.php: ddl_change_structure_exception thrown
          line 1000 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
          line 77 of /lib/ddl/database_manager.php: call to mysqli_native_moodle_database->change_database_structure()
          line 425 of /lib/ddl/database_manager.php: call to database_manager->execute_sql_arr()
          line 370 of /lib/ddl/database_manager.php: call to database_manager->install_from_xmldb_structure()
          line 526 of /lib/upgradelib.php: call to database_manager->install_from_xmldb_file()
          line 1754 of /lib/upgradelib.php: call to upgrade_plugins()
          line 699 of /admin/index.php: call to upgrade_noncore()
      

            Unassigned Unassigned
            marina Marina Glancy
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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