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

Unable to set aria_block_size on Windows before initializing the data directory

    XMLWordPrintable

Details

    Description

      mysql_install_db.exe will not read any my.ini when initializing the data director. If a my.ini is present in datadir, it won't run at all; if a my.ini is not present, it runs and passes --no-defaults to mysqld.exe, which assumes hard-coded defaults for all server variables. It always initializes the system tables with default aria_block_size of 8192 (consistent with the docs: https://mariadb.com/kb/en/aria-system-variables/#aria_block_size).

      Placing a my.ini on some of the common locations on Windows has not worked. None are detected because mysqld.exe is called with --no-defaults. Also, in general, mysql_install_db.exe creates the Windows service with the mysqld option --defaults-file="C:\path\to\datadir\my.ini", which is where its barebones my.ini is created.

      Changing aria_block_size in my.ini after initialization will result in failure to start mysqld, with the following in the error log:

      2020-11-30 18:01:21 0 [Warning] option 'aria-block-size': unsigned value 2048 adjusted to 4096
      2020-11-30 18:01:21 0 [ERROR] mysqld.exe: Got error 'Block size in control file (8192) is different than given aria_block_size: 4096' when trying to use aria control file 'C:\mariadb\data\aria_log_control'
      2020-11-30 18:01:21 0 [ERROR] Plugin 'Aria' init function returned error.
      2020-11-30 18:01:21 0 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
      2020-11-30 18:01:21 0 [Warning] The parameter innodb_buffer_pool_instances is deprecated and has no effect.
      2020-11-30 18:01:21 0 [Warning] The parameter innodb_thread_concurrency is deprecated and has no effect.
      InnoDB: using atomic writes.
      2020-11-30 18:01:21 0 [Note] InnoDB: Uses event mutexes
      2020-11-30 18:01:21 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
      2020-11-30 18:01:21 0 [Note] InnoDB: Number of pools: 1
      2020-11-30 18:01:21 0 [Note] InnoDB: Using SSE4.2 crc32 instructions
      2020-11-30 18:01:21 0 [Note] InnoDB: Initializing buffer pool, total size = 1073741824, chunk size = 134217728
      2020-11-30 18:01:21 0 [Note] InnoDB: Completed initialization of buffer pool
      2020-11-30 18:01:21 0 [Note] InnoDB: 128 rollback segments are active.
      2020-11-30 18:01:21 0 [Note] InnoDB: Creating shared tablespace for temporary tables
      2020-11-30 18:01:21 0 [Note] InnoDB: Setting file '.\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
      2020-11-30 18:01:21 0 [Note] InnoDB: File '.\ibtmp1' size is now 12 MB.
      2020-11-30 18:01:21 0 [Note] InnoDB: 10.5.6 started; log sequence number 65493780; transaction id 84269
      2020-11-30 18:01:21 0 [Note] Plugin 'FEEDBACK' is disabled.
      2020-11-30 18:01:21 0 [Note] InnoDB: Loading buffer pool(s) from C:\mariadb\data\ib_buffer_pool
      2020-11-30 18:01:21 0 [ERROR] Could not open mysql.plugin table: "Unknown storage engine 'Aria'". Some plugins may be not loaded
      2020-11-30 18:01:21 0 [ERROR] Failed to initialize plugins.
      2020-11-30 18:01:21 0 [ERROR] Aborting
      

      Removing aria_log_control and aria_log.#### files from the datadir results in the following startup failures:

      2020-11-30 18:04:42 0 [Warning] option 'aria-block-size': unsigned value 2048 adjusted to 4096
      2020-11-30 18:04:42 0 [Warning] The parameter innodb_buffer_pool_instances is deprecated and has no effect.
      2020-11-30 18:04:42 0 [Warning] The parameter innodb_thread_concurrency is deprecated and has no effect.
      InnoDB: using atomic writes.
      2020-11-30 18:04:42 0 [Note] InnoDB: Uses event mutexes
      2020-11-30 18:04:42 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
      2020-11-30 18:04:42 0 [Note] InnoDB: Number of pools: 1
      2020-11-30 18:04:42 0 [Note] InnoDB: Using SSE4.2 crc32 instructions
      2020-11-30 18:04:42 0 [Note] InnoDB: Initializing buffer pool, total size = 1073741824, chunk size = 134217728
      2020-11-30 18:04:42 0 [Note] InnoDB: Completed initialization of buffer pool
      2020-11-30 18:04:42 0 [Note] InnoDB: 128 rollback segments are active.
      2020-11-30 18:04:42 0 [Note] InnoDB: Creating shared tablespace for temporary tables
      2020-11-30 18:04:42 0 [Note] InnoDB: Setting file '.\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
      2020-11-30 18:04:42 0 [Note] InnoDB: File '.\ibtmp1' size is now 12 MB.
      2020-11-30 18:04:42 0 [Note] InnoDB: 10.5.6 started; log sequence number 65493792; transaction id 84269
      2020-11-30 18:04:42 0 [Note] Plugin 'FEEDBACK' is disabled.
      2020-11-30 18:04:42 0 [Note] InnoDB: Loading buffer pool(s) from C:\mariadb\data\ib_buffer_pool
      2020-11-30 18:04:42 0 [ERROR] Couldn't repair table: mysql.plugin
      2020-11-30 18:04:42 0 [ERROR] Could not open mysql.plugin table: "Index for table 'plugin' is corrupt; try to repair it". Some plugins may be not loaded
      2020-11-30 18:04:42 0 [ERROR] Couldn't repair table: mysql.servers
      2020-11-30 18:04:42 0 [ERROR] Can't open and lock privilege tables: Index for table 'servers' is corrupt; try to repair it
      2020-11-30 18:04:42 0 [Note] Server socket created on IP: '::'.
      2020-11-30 18:04:42 0 [ERROR] Couldn't repair table: mysql.db
      2020-11-30 18:04:42 0 [ERROR] Fatal error: Can't open and lock privilege tables: Index for table 'db' is corrupt; try to repair it
      2020-11-30 18:04:42 0 [ERROR] Aborting
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mpflaum Maria M Pflaum
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.