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

"mariadb-install-db --enforce-storage-engine=InnoDB" fails with InnoDB errors

    XMLWordPrintable

Details

    Description

      It should be possible to create InnoDB system tables. This gives uses the option for smaller backups, and like Azure, to use InnoDB only.

      10.3 has inbuilt prevention to avoid this, so not fixing for 10.3

      $  mkdir -p /tmp/${PWD##*/}-datadir && scripts/mysql_install_db --no-defaults --srcdir=$OLDPWD --builddir=$PWD --datadir=/tmp/${PWD##*/}-datadir --verbose --enforce-storage-engine=InnoDB
      Installing MariaDB/MySQL system tables in '/tmp/build-mariadb-server-10.3-datadir' ...
      2022-11-22  9:13:40 0 [Note] /home/dan/repos/build-mariadb-server-10.3/sql/mysqld (mysqld 10.3.38-MariaDB) starting as process 121577 ...
      ...
      2022-11-22  9:13:40 0 [Note] InnoDB: 10.3.38 started; log sequence number 0; transaction id 7
      2022-11-22  9:13:40 6 [ERROR] InnoDB: Trying to create a MySQL system table `mysql`.`db` of type InnoDB. MySQL system tables must be of the MyISAM type!
      ERROR: 1005  Can't create table `mysql`.`db` (errno: 168 "Unknown (generic) error from engine")
      2022-11-22  9:13:40 0 [ERROR] Aborting
      

      10.4

      $  mkdir -p /tmp/${PWD##*/}-datadir && scripts/mysql_install_db --no-defaults --srcdir=$OLDPWD --builddir=$PWD --datadir=/tmp/${PWD##*/}-datadir --verbose --enforce-storage-engine=InnoDB
      Installing MariaDB/MySQL system tables in '/tmp/build-mariadb-server-10.4-datadir' ...
      2022-11-22  9:16:05 0 [Note] /home/dan/repos/build-mariadb-server-10.4/sql/mysqld (mysqld 10.4.28-MariaDB) starting as process 121834 ...
      2022-11-22  9:16:05 0 [Note] InnoDB: Using Linux native AIO
      2022-11-22  9:16:05 0 [Note] InnoDB: The first innodb_system data file 'ibdata1' did not exist. A new tablespace will be created!
      2022-11-22  9:16:05 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
      2022-11-22  9:16:05 0 [Note] InnoDB: Uses event mutexes
      2022-11-22  9:16:05 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
      2022-11-22  9:16:05 0 [Note] InnoDB: Number of pools: 1
      2022-11-22  9:16:05 0 [Note] InnoDB: Using SSE2 crc32 instructions
      2022-11-22  9:16:05 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
      2022-11-22  9:16:05 0 [Note] InnoDB: Completed initialization of buffer pool
      2022-11-22  9:16:05 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
      2022-11-22  9:16:05 0 [Note] InnoDB: Setting file './ibdata1' size to 12 MB. Physically writing the file full; Please wait ...
      2022-11-22  9:16:05 0 [Note] InnoDB: File './ibdata1' size is now 12 MB.
      2022-11-22  9:16:05 0 [Note] InnoDB: Setting log file ./ib_logfile101 size to 50331648 bytes
      2022-11-22  9:16:05 0 [Note] InnoDB: Setting log file ./ib_logfile1 size to 50331648 bytes
      2022-11-22  9:16:05 0 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
      2022-11-22  9:16:05 0 [Note] InnoDB: New log files created, LSN=11451
      2022-11-22  9:16:05 0 [Note] InnoDB: Doublewrite buffer not found: creating new
      2022-11-22  9:16:05 0 [Note] InnoDB: Doublewrite buffer created
      2022-11-22  9:16:05 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
      2022-11-22  9:16:05 0 [Note] InnoDB: Creating foreign key constraint system tables.
      2022-11-22  9:16:05 0 [Note] InnoDB: Creating tablespace and datafile system tables.
      2022-11-22  9:16:05 0 [Note] InnoDB: Creating sys_virtual system tables.
      2022-11-22  9:16:05 0 [Note] InnoDB: Creating shared tablespace for temporary tables
      2022-11-22  9:16:05 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
      2022-11-22  9:16:05 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
      2022-11-22  9:16:05 0 [Note] InnoDB: Waiting for purge to start
      2022-11-22  9:16:05 0 [Note] InnoDB: 10.4.28 started; log sequence number 0; transaction id 7
      2022-11-22  9:16:05 6 [ERROR] InnoDB: Table `mysql`.`innodb_table_stats` not found.
      OK
      

      Could remove the InnoDB error in bootstrap. But otherwise works.

      10.5

      $  mkdir -p /tmp/${PWD##*/}-datadir && scripts/mysql_install_db --no-defaults --srcdir=$OLDPWD --builddir=$PWD --datadir=/tmp/${PWD##*/}-datadir --verbose --enforce-storage-engine=InnoDB
      Installing MariaDB/MySQL system tables in '/tmp/build-mariadb-server-10.5-datadir' ...
      2022-11-22  9:18:40 0 [Note] /home/dan/repos/build-mariadb-server-10.5/sql/mysqld (mysqld 10.5.19-MariaDB-1:10.5.13+maria~stretch) starting as process 122427 ...
      ..
      2022-11-22  9:18:40 1 [ERROR] InnoDB: Table `mysql`.`innodb_table_stats` not found.
      ERROR: 1005  Can't create table `mysql`.`help_relation` (errno: 150 "Foreign key constraint is incorrectly formed")
      2022-11-22  9:18:40 0 [ERROR] Aborting
      

      10.5+ is a FK sql fix. + once resolved, ER_WRONG_LOCK_OF_SYSTEM_TABLE is triggered for the LOCK TABLES in the scripts/fill_help_tables.sql.

      10.5

      $  mkdir -p /tmp/${PWD##*/}-datadir && scripts/mysql_install_db --no-defaults --srcdir=$OLDPWD --builddir=$PWD --datadir=/tmp/${PWD##*/}-datadir --verbose --enforce-storage-engine=innodb
      Installing MariaDB/MySQL system tables in '/tmp/build-mariadb-server-10.5-datadir' ...
      2022-11-22  9:22:07 0 [Note] /home/dan/repos/build-mariadb-server-10.5/sql/mysqld (mysqld 10.5.19-MariaDB-1:10.5.13+maria~stretch) starting as process 122901 
      2022-11-22  9:22:07 0 [Note] InnoDB: 10.5.19 started; log sequence number 0; transaction id 7
      2022-11-22  9:22:07 1 [ERROR] InnoDB: Table `mysql`.`innodb_table_stats` not found.
      ERROR: 1428  You can't combine write-locking of system tables with other tables or lock types
      2022-11-22  9:22:07 0 [ERROR] Aborting
      

      Attachments

        Issue Links

          Activity

            People

              danblack Daniel Black
              danblack Daniel Black
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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