Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-4950

mysql_upgrade fails with disabled InnoDB

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.0.4
    • 10.0.5
    • None
    • None

    Description

      Initially reported at https://blog.mariadb.org/mariadb-10-0-4-alpha-now-available/

      If server is started without InnoDB on an old datadir, mysql_upgrade fails with

      Phase 3/3: Running 'mysql_fix_privilege_tables'...
      ERROR 1286 (42000) at line 37: Unknown storage engine 'INNODB'
      ERROR 1286 (42000) at line 46: Unknown storage engine 'INNODB'
      FATAL ERROR: Upgrade failed

      scripts/mysql_fix_privilege_tables.sql sets NO_ENGINE_SUBSTITUTION and then attempts to create tables using InnoDB engine, so the error is not surprising.

      MySQL 5.6.13 has additional logic that checks for the presence of InnoDB and skips table creation if there is no InnoDB. However, it should be adopted with caution, because it also has a problem, later it attempts to ALTER the tables unconditionally, so mysql_upgrade fails anyway (see http://bugs.mysql.com/bug.php?id=70152).

      As discussed, we should not create the tables if InnoDB is disabled (and should not attempt ALTERing them). mysql_upgrade should not fail, but it might make sense to produce a warning.

      Attachments

        Activity

          elenst Elena Stepanova created issue -
          elenst Elena Stepanova made changes -
          Field Original Value New Value
          Description Initially reported at https://blog.mariadb.org/mariadb-10-0-4-alpha-now-available/

          If server is started without InnoDB on an old datadir, mysql_upgrade fails with

          {noformat}
          Phase 3/3: Running 'mysql_fix_privilege_tables'...
          ERROR 1286 (42000) at line 37: Unknown storage engine 'INNODB'
          ERROR 1286 (42000) at line 46: Unknown storage engine 'INNODB'
          FATAL ERROR: Upgrade failed
          {noformat}

          scripts/mysql_fix_privilege_tables.sql sets NO_ENGINE_SUBSTITUTION and then attempts to create tables using InnoDB engine, so the error is not surprising.

          MySQL 5.6.13 has additional logic that checks for the presence of InnoDB and skips table creation if there is no InnoDB. However, it should be adopted with caution, because it also has a problem, later it attempts to ALTER the tables unconditionally, so mysql_upgrade fails anyway.

          As discussed, we should not create the tables if InnoDB is disabled (and should not attempt ALTERing them). mysql_upgrade should not fail, but it might make sense to produce a warning.


          Initially reported at https://blog.mariadb.org/mariadb-10-0-4-alpha-now-available/

          If server is started without InnoDB on an old datadir, mysql_upgrade fails with

          {noformat}
          Phase 3/3: Running 'mysql_fix_privilege_tables'...
          ERROR 1286 (42000) at line 37: Unknown storage engine 'INNODB'
          ERROR 1286 (42000) at line 46: Unknown storage engine 'INNODB'
          FATAL ERROR: Upgrade failed
          {noformat}

          scripts/mysql_fix_privilege_tables.sql sets NO_ENGINE_SUBSTITUTION and then attempts to create tables using InnoDB engine, so the error is not surprising.

          MySQL 5.6.13 has additional logic that checks for the presence of InnoDB and skips table creation if there is no InnoDB. However, it should be adopted with caution, because it also has a problem, later it attempts to ALTER the tables unconditionally, so mysql_upgrade fails anyway (see http://bugs.mysql.com/bug.php?id=70152).

          As discussed, we should not create the tables if InnoDB is disabled (and should not attempt ALTERing them). mysql_upgrade should not fail, but it might make sense to produce a warning.


          svoj Sergey Vojtovich made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          svoj Sergey Vojtovich made changes -
          Attachment mdev-4950.patch [ 23502 ]
          svoj Sergey Vojtovich made changes -
          Assignee Sergey Vojtovich [ svoj ] Sergei Golubchik [ serg ]

          Sergei, please review attached patch.

          svoj Sergey Vojtovich added a comment - Sergei, please review attached patch.
          serg Sergei Golubchik made changes -
          Assignee Sergei Golubchik [ serg ] Sergey Vojtovich [ svoj ]

          looks ok

          serg Sergei Golubchik added a comment - looks ok

          Fixed in 10.0.5, revision-id: svoj@mariadb.org-20130913084451-fu9eht7jpouid00w

          svoj Sergey Vojtovich added a comment - Fixed in 10.0.5, revision-id: svoj@mariadb.org-20130913084451-fu9eht7jpouid00w
          svoj Sergey Vojtovich made changes -
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Closed [ 6 ]
          serg Sergei Golubchik made changes -
          Workflow defaullt [ 28702 ] MariaDB v2 [ 44607 ]
          ratzpo Rasmus Johansson (Inactive) made changes -
          Workflow MariaDB v2 [ 44607 ] MariaDB v3 [ 63958 ]
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 63958 ] MariaDB v4 [ 146983 ]

          People

            svoj Sergey Vojtovich
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.