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

mariadb_upgrade runs every startup

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 10.5.12
    • N/A
    • Scripts & Clients
    • None
    • Linux docker-compose

    Description

      Documentation says:

      Documentation

      mysql_upgrade also saves the MariaDB version number in a file named mysql_upgrade_info in the data directory. This is used to quickly check whether all tables have been checked for this release so that table-checking can be skipped. For this reason, mysql_upgrade needs to be run as a user with write access to the data directory.

      Problem
      But mariadb_upgrade does check all tables every startup. This is a problem with many databases and tables on a not so fast storage.

      How to test
      Test has be done with bitnami docker container. It calls mariadb_upgrade every startup. According to documentation this should be ok.

      File "mysql_upgrade_info" is written and get correct timestamp and content. But this information seems to be ignored by the tool.

      Expected behavior
      mysql_upgrade should work like it is documented.

      Why critical?
      mariadb_upgrade take 2h for our installation. A container can restart for various reasons. And this means a relevant production downtime for us.

      test setup via docker-compose.yaml

      version: '2.0'
       
      services:
        mariadb:
          image: docker.io/bitnami/mariadb:10.5.12
          ports:
            - '3306:3306'
          volumes:
            - '/root/fixMariadbUpgrade:/bitnami/mariadb'
            - /root/fixMariadbUpgrade/my_custom.cnf:/opt/bitnami/mariadb/conf/my_custom.cnf:ro
          environment:
            - MARIADB_ROOT_PASSWORD=****
            - BITNAMI_DEBUG=true
      


      my_custom.cnf:

      [mysqld]
      innodb_page_size=64k
      skip-name-resolve
      explicit_defaults_for_timestamp
      basedir=/opt/bitnami/mariadb
      plugin_dir=/opt/bitnami/mariadb/plugin
      port=3306
      socket=/opt/bitnami/mariadb/tmp/mysql.sock
      tmpdir=/opt/bitnami/mariadb/tmp
      max_allowed_packet=16M
      bind-address=0.0.0.0
      pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid
      log-error=/opt/bitnami/mariadb/logs/mysqld.log
      character-set-server=utf8mb4
      collation-server=utf8mb4_unicode_ci
      max_connections = 1186
      [client]
      port=3306
      socket=/opt/bitnami/mariadb/tmp/mysql.sock
      default-character-set=utf8mb4
      plugin_dir=/opt/bitnami/mariadb/plugin
      [manager]
      port=3306
      socket=/opt/bitnami/mariadb/tmp/mysql.sock
      pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid
      

      Attachments

        Issue Links

          Activity

            People

              danblack Daniel Black
              tgruenert Thomas Gruenert
              Votes:
              1 Vote for this issue
              Watchers:
              4 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.