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

Test migration from MySQL 5.7 with named tablespaces to MariaDB 10.2

Details

    • Task
    • Status: Stalled (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.2(EOL)
    • Tests
    • None

    Description

      We don't expect live upgrade to work when MySQL 5.7 has tables using named tablespaces, but the goal is to find out how exactly it does not work, in order to avoid data corruption and improve the diagnostics.

      General test flow:

      • start the "old" server;
      • execute some SQL related to tablespaces;
      • shutdown the server (with innodb_fast_shutdown=0);
      • start the "new" server on the same datadir;
      • run mysql_upgrade;
      • shutdown the server;
      • start the server again;
      • execute some SQL related to tablespaces.

      RESULTS

      Test 1: Migration of an empty tablespace

      Result: OK
      The tablespace is simply ignored

      Test 2: Migration of one tablespace with a simple table

      Variant A: debug server

      Result: FAIL (assertion failure)
      Server fails to start

      10.2 a06da5c848e6

      mysqld: /data/src/10.2/storage/innobase/dict/dict0load.cc:1304: ulint dict_check_sys_tables(bool): Assertion `!((flags & ((~(~0U << 1)) << 0)) >> 0) || flags2 & 16U' failed.
      170320 15:46:27 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f8e86733312 in __GI___assert_fail (assertion=0x7f8e89cc0370 "!((flags & ((~(~0U << 1)) << 0)) >> 0) || flags2 & 16U", file=0x7f8e89cbfb48 "/data/src/10.2/storage/innobase/dict/dict0load.cc", line=1304, function=0x7f8e89cc2e80 <dict_check_sys_tables(bool)::__PRETTY_FUNCTION__> "ulint dict_check_sys_tables(bool)") at assert.c:101
      #8  0x00007f8e898645fd in dict_check_sys_tables (validate=true) at /data/src/10.2/storage/innobase/dict/dict0load.cc:1303
      #9  0x00007f8e89864a3e in dict_check_tablespaces_and_store_max_id (validate=false) at /data/src/10.2/storage/innobase/dict/dict0load.cc:1398
      #10 0x00007f8e89745790 in innobase_start_or_create_for_mysql () at /data/src/10.2/storage/innobase/srv/srv0start.cc:2459
      #11 0x00007f8e89583625 in innobase_init (p=0x7f8e85c4d0f0) at /data/src/10.2/storage/innobase/handler/ha_innodb.cc:4453
      #12 0x00007f8e8927b73e in ha_initialize_handlerton (plugin=0x7f8e85ef3880) at /data/src/10.2/sql/handler.cc:512
      #13 0x00007f8e89029378 in plugin_initialize (tmp_root=0x7ffeb991f370, plugin=0x7f8e85ef3880, argc=0x7f8e8a54d7f0 <remaining_argc>, argv=0x7f8e85c481a8, options_only=false) at /data/src/10.2/sql/sql_plugin.cc:1415
      #14 0x00007f8e89029f2f in plugin_init (argc=0x7f8e8a54d7f0 <remaining_argc>, argv=0x7f8e85c481a8, flags=0) at /data/src/10.2/sql/sql_plugin.cc:1690
      #15 0x00007f8e88f375e9 in init_server_components () at /data/src/10.2/sql/mysqld.cc:5249
      #16 0x00007f8e88f38668 in mysqld_main (argc=11, argv=0x7f8e85c481a8) at /data/src/10.2/sql/mysqld.cc:5841
      #17 0x00007f8e88f2d620 in main (argc=11, argv=0x7ffeb99200b8) at /data/src/10.2/sql/main.cc:25
      

      Variant B: release server

      Result: FAIL (Table doesn't exist in engine)
      Server starts and allows mysql_upgrade, but an attempt to use or even see the table causes failure:

      bin/mysql -uroot --protocol=tcp test -e 'SHOW CREATE TABLE t1'
      ERROR 1932 (42S02) at line 1: Table 'test.t1' doesn't exist in engine
      

      10.2.4

      2017-03-20 15:51:05 140532080670592 [ERROR] InnoDB: In file './space1f1.ibd', tablespace id and flags are 37 and 0, but in the InnoDB data dictionary they are 37 and 0x21. Have you moved InnoDB .ibd files around without using the commands DISCARD TABLESPACE and IMPORT TABLESPACE? Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting-datadict.html for how to resolve the issue.
      2017-03-20 15:51:05 140532080670592 [ERROR] InnoDB: Operating system error number 2 in a file operation.
      2017-03-20 15:51:05 140532080670592 [ERROR] InnoDB: The error means the system cannot find the path specified.
      2017-03-20 15:51:05 140532080670592 [ERROR] InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.
      2017-03-20 15:51:05 140532080670592 [ERROR] InnoDB: Could not find a valid tablespace file for `test/t1`. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting-datadict.html for how to resolve the issue.
      2017-03-20 15:51:05 140532080670592 [Warning] InnoDB: Ignoring tablespace for `test`.`t1` because it could not be opened.
      2017-03-20 15:51:06 140532079878912 [ERROR] InnoDB: Failed to find tablespace for table `test`.`t1` in the cache. Attempting to load the tablespace with space id 37
      2017-03-20 15:51:06 140532079878912 [ERROR] InnoDB: Operating system error number 2 in a file operation.
      2017-03-20 15:51:06 140532079878912 [ERROR] InnoDB: The error means the system cannot find the path specified.
      2017-03-20 15:51:06 140532079878912 [ERROR] InnoDB: Cannot open datafile for read-only: './test/t1.ibd' OS error: 71
      2017-03-20 15:51:06 140532079878912 [ERROR] InnoDB: Operating system error number 2 in a file operation.
      2017-03-20 15:51:06 140532079878912 [ERROR] InnoDB: The error means the system cannot find the path specified.
      2017-03-20 15:51:06 140532079878912 [ERROR] InnoDB: Could not find a valid tablespace file for `test/t1`. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting-datadict.html for how to resolve the issue.
      2017-03-20 15:51:06 140532079878912 [Warning] InnoDB: Cannot calculate statistics for table `test`.`t1` because the .ibd file is missing. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting.html for how to resolve the issue.
      

      Attachments

        Issue Links

          Activity

            marko, see results in the description. There isn't much room to proceed. If you decide to make changes, I can re-run the tests easily, and maybe add something else if it makes sense.

            elenst Elena Stepanova added a comment - marko , see results in the description. There isn't much room to proceed. If you decide to make changes, I can re-run the tests easily, and maybe add something else if it makes sense.

            elenst, it would be interesting to see how MariaDB Server 10.6 would behave here. In the spirit of MDEV-13542, we are not supposed to crash.

            marko Marko Mäkelä added a comment - elenst , it would be interesting to see how MariaDB Server 10.6 would behave here. In the spirit of MDEV-13542 , we are not supposed to crash.
            danblack Daniel Black added a comment - - edited

            $ podman volume create m57
            m57
             
            $ vi d/m57.sql 
             
            $ cat d/m57.sql 
            CREATE TABLESPACE space1 ADD DATAFILE 'space1f1.ibd';
            CREATE TABLE t1 (i int) TABLESPACE space1;
            SHOW CREATE TABLE t1;
            INSERT INTO t1 VALUES (1),(2);
            SELECT * FROM t1;
             
            $ podman run -v m57:/var/lib/mysql -v ./d:/docker-entrypoint-initdb.d:Z -e MYSQL_ROOT_PASSWORD=bob -e MYSQL_DATABASE=test -e MYSQL_USER=test -e MYSQL_PASSWORD=test --rm  mysql:5.7
            2023-11-29 23:30:49+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.44-1.el7 started.
            2023-11-29 23:30:49+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
            2023-11-29 23:30:49+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.44-1.el7 started.
            ....
            2023-11-29 23:30:52+00:00 [Note] [Entrypoint]: Creating database test
            2023-11-29 23:30:52+00:00 [Note] [Entrypoint]: Creating user test
            2023-11-29 23:30:53+00:00 [Note] [Entrypoint]: Giving user test access to schema test
             
            2023-11-29 23:30:53+00:00 [Note] [Entrypoint]: /usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/m57.sql
            Table	Create Table
            t1	CREATE TABLE `t1` (\n  `i` int(11) DEFAULT NULL\n) /*!50100 TABLESPACE `space1` */ ENGINE=InnoDB DEFAULT CHARSET=latin1
            i
            1
            2
             
             
            2023-11-29 23:30:53+00:00 [Note] [Entrypoint]: Stopping temporary server
            ....
            2023-11-29T23:31:00.127796Z 0 [Note] mysqld: Shutdown complete
             
             
            $ podman run -v m57:/var/lib/mysql/ -e MARIADB_AUTO_UPGRADE=1 --name m106 mariadb:10.6
            2023-11-29 23:31:37+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.6.16+maria~ubu2004 started.
            2023-11-29 23:31:39+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
            2023-11-29 23:31:39+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.6.16+maria~ubu2004 started.
            2023-11-29 23:31:40+00:00 [Note] [Entrypoint]: MariaDB upgrade information missing, assuming required
            2023-11-29 23:31:40+00:00 [Note] [Entrypoint]: Starting temporary server
            2023-11-29 23:31:40+00:00 [Note] [Entrypoint]: Waiting for server startup
            2023-11-29 23:31:40 0 [Note] Starting MariaDB 10.6.16-MariaDB-1:10.6.16+maria~ubu2004 source revision b83c379420a8846ae4b28768d3c81fa354cca056 as process 103
            2023-11-29 23:31:40 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
            2023-11-29 23:31:40 0 [Note] InnoDB: Number of pools: 1
            2023-11-29 23:31:40 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
            2023-11-29 23:31:40 0 [Note] mariadbd: O_TMPFILE is not supported on /tmp (disabling future attempts)
            2023-11-29 23:31:40 0 [Note] InnoDB: Using Linux native AIO
            2023-11-29 23:31:40 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
            2023-11-29 23:31:40 0 [Note] InnoDB: Completed initialization of buffer pool
            2023-11-29 23:31:40 0 [Note] InnoDB: 128 rollback segments are active.
            2023-11-29 23:31:40 0 [ERROR] InnoDB: Table test/t1 in InnoDB data dictionary contains invalid flags. SYS_TABLES.TYPE=161 SYS_TABLES.N_COLS=2147483649
            2023-11-29 23:31:40 0 [Note] InnoDB: Creating shared tablespace for temporary tables
            2023-11-29 23:31:40 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
            2023-11-29 23:31:40 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
            2023-11-29 23:31:40 0 [Note] InnoDB: 10.6.16 started; log sequence number 12230849; transaction id 1794
            2023-11-29 23:31:40 0 [Note] Plugin 'FEEDBACK' is disabled.
            2023-11-29 23:31:40 1 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1146: Table 'mysql.gtid_slave_pos' doesn't exist
            2023-11-29 23:31:40 0 [Note] mariadbd: ready for connections.
            Version: '10.6.16-MariaDB-1:10.6.16+maria~ubu2004'  socket: '/run/mysqld/mysqld.sock'  port: 0  mariadb.org binary distribution
            2023-11-29 23:31:41+00:00 [Note] [Entrypoint]: Temporary server started.
            2023-11-29 23:31:41+00:00 [Note] [Entrypoint]: Backing up system database to system_mysql_backup_unknown_version.sql.zst
            2023-11-29 23:31:41+00:00 [Note] [Entrypoint]: Backing up complete
            2023-11-29 23:31:41+00:00 [Note] [Entrypoint]: Starting mariadb-upgrade
            The --upgrade-system-tables option was used, user tables won't be touched.
            MariaDB upgrade detected
            Phase 1/8: Checking and upgrading mysql database
            Processing databases
            mysql
            mysql.columns_priv                                 OK
            mysql.db                                           OK
            mysql.engine_cost                                  OK
            mysql.event                                        OK
            mysql.func                                         OK
            mysql.gtid_executed                                OK
            mysql.help_category                                OK
            mysql.help_keyword                                 OK
            mysql.help_relation                                OK
            mysql.help_topic                                   OK
            mysql.innodb_index_stats                           OK
            mysql.innodb_table_stats                           OK
            mysql.ndb_binlog_index                             OK
            mysql.plugin                                       OK
            mysql.proc                                         OK
            mysql.procs_priv                                   OK
            mysql.proxies_priv                                 OK
            mysql.server_cost                                  OK
            mysql.servers                                      OK
            mysql.slave_master_info                            OK
            mysql.slave_relay_log_info                         OK
            mysql.slave_worker_info                            OK
            mysql.tables_priv                                  OK
            mysql.time_zone                                    OK
            mysql.time_zone_leap_second                        OK
            mysql.time_zone_name                               OK
            mysql.time_zone_transition                         OK
            mysql.time_zone_transition_type                    OK
            mysql.user                                         OK
            Phase 2/8: Installing used storage engines... Skipped
            Phase 3/8: Running 'mysql_fix_privilege_tables'
            Phase 4/8: Fixing views from mysql
            mysql.user                                         OK
            sys.host_summary                                   OK
            sys.host_summary_by_file_io                        OK
            sys.host_summary_by_file_io_type                   OK
            sys.host_summary_by_stages                         OK
            sys.host_summary_by_statement_latency              OK
            sys.host_summary_by_statement_type                 OK
            sys.innodb_buffer_stats_by_schema                  OK
            sys.innodb_buffer_stats_by_table                   OK
            sys.innodb_lock_waits                              OK
            sys.io_by_thread_by_latency                        OK
            sys.io_global_by_file_by_bytes                     OK
            sys.io_global_by_file_by_latency                   OK
            sys.io_global_by_wait_by_bytes                     OK
            sys.io_global_by_wait_by_latency                   OK
            sys.latest_file_io                                 OK
            sys.memory_by_host_by_current_bytes                OK
            sys.memory_by_thread_by_current_bytes              OK
            sys.memory_by_user_by_current_bytes                OK
            sys.memory_global_by_current_bytes                 OK
            sys.memory_global_total                            OK
            sys.metrics                                        OK
            sys.processlist                                    OK
            sys.ps_check_lost_instrumentation                  OK
            sys.schema_auto_increment_columns                  OK
            sys.schema_index_statistics                        OK
            sys.schema_object_overview                         OK
            sys.schema_redundant_indexes                       OK
            sys.schema_table_lock_waits                        OK
            sys.schema_table_statistics                        OK
            sys.schema_table_statistics_with_buffer            OK
            sys.schema_tables_with_full_table_scans            OK
            sys.schema_unused_indexes                          OK
            sys.session                                        OK
            sys.session_ssl_status                             OK
            sys.statement_analysis                             OK
            sys.statements_with_errors_or_warnings             OK
            sys.statements_with_full_table_scans               OK
            sys.statements_with_runtimes_in_95th_percentile    OK
            sys.statements_with_sorting                        OK
            sys.statements_with_temp_tables                    OK
            sys.user_summary                                   OK
            sys.user_summary_by_file_io                        OK
            sys.user_summary_by_file_io_type                   OK
            sys.user_summary_by_stages                         OK
            sys.user_summary_by_statement_latency              OK
            sys.user_summary_by_statement_type                 OK
            sys.version                                        OK
            sys.wait_classes_global_by_avg_latency             OK
            sys.wait_classes_global_by_latency                 OK
            sys.waits_by_host_by_latency                       OK
            sys.waits_by_user_by_latency                       OK
            sys.waits_global_by_latency                        OK
            sys.x$host_summary                                 OK
            sys.x$host_summary_by_file_io                      OK
            sys.x$host_summary_by_file_io_type                 OK
            sys.x$host_summary_by_stages                       OK
            sys.x$host_summary_by_statement_latency            OK
            sys.x$host_summary_by_statement_type               OK
            sys.x$innodb_buffer_stats_by_schema                OK
            sys.x$innodb_buffer_stats_by_table                 OK
            sys.x$innodb_lock_waits                            OK
            sys.x$io_by_thread_by_latency                      OK
            sys.x$io_global_by_file_by_bytes                   OK
            sys.x$io_global_by_file_by_latency                 OK
            sys.x$io_global_by_wait_by_bytes                   OK
            sys.x$io_global_by_wait_by_latency                 OK
            sys.x$latest_file_io                               OK
            sys.x$memory_by_host_by_current_bytes              OK
            sys.x$memory_by_thread_by_current_bytes            OK
            sys.x$memory_by_user_by_current_bytes              OK
            sys.x$memory_global_by_current_bytes               OK
            sys.x$memory_global_total                          OK
            sys.x$processlist                                  OK
            sys.x$ps_digest_95th_percentile_by_avg_us          OK
            sys.x$ps_digest_avg_latency_distribution           OK
            sys.x$ps_schema_table_statistics_io                OK
            sys.x$schema_flattened_keys                        OK
            sys.x$schema_index_statistics                      OK
            sys.x$schema_table_lock_waits                      OK
            sys.x$schema_table_statistics                      OK
            sys.x$schema_table_statistics_with_buffer          OK
            sys.x$schema_tables_with_full_table_scans          OK
            sys.x$session                                      OK
            sys.x$statement_analysis                           OK
            sys.x$statements_with_errors_or_warnings           OK
            sys.x$statements_with_full_table_scans             OK
            sys.x$statements_with_runtimes_in_95th_percentile  OK
            sys.x$statements_with_sorting                      OK
            sys.x$statements_with_temp_tables                  OK
            sys.x$user_summary                                 OK
            sys.x$user_summary_by_file_io                      OK
            sys.x$user_summary_by_file_io_type                 OK
            sys.x$user_summary_by_stages                       OK
            sys.x$user_summary_by_statement_latency            OK
            sys.x$user_summary_by_statement_type               OK
            sys.x$wait_classes_global_by_avg_latency           OK
            sys.x$wait_classes_global_by_latency               OK
            sys.x$waits_by_host_by_latency                     OK
            sys.x$waits_by_user_by_latency                     OK
            sys.x$waits_global_by_latency                      OK
            Phase 5/8: Fixing table and database names ... Skipped
            Phase 6/8: Checking and upgrading tables... Skipped
            Phase 7/8: uninstalling plugins
            Phase 8/8: Running 'FLUSH PRIVILEGES'
            OK
            2023-11-29 23:31:43+00:00 [Note] [Entrypoint]: Finished mariadb-upgrade
            2023-11-29 23:31:43+00:00 [Note] [Entrypoint]: Stopping temporary server
            2023-11-29 23:31:43 0 [Note] mariadbd (initiated by: unknown): Normal shutdown
            2023-11-29 23:31:43 0 [Note] InnoDB: FTS optimize thread exiting.
            2023-11-29 23:31:43 0 [Note] InnoDB: Starting shutdown...
            2023-11-29 23:31:43 0 [Note] InnoDB: Removed temporary tablespace data file: "./ibtmp1"
            2023-11-29 23:31:43 0 [Note] InnoDB: Shutdown completed; log sequence number 12246560; transaction id 1833
            2023-11-29 23:31:43 0 [Note] mariadbd: Shutdown complete
             
            2023-11-29 23:31:43+00:00 [Note] [Entrypoint]: Temporary server stopped
            2023-11-29 23:31:43 0 [Note] Starting MariaDB 10.6.16-MariaDB-1:10.6.16+maria~ubu2004 source revision b83c379420a8846ae4b28768d3c81fa354cca056 as process 1
            2023-11-29 23:31:43 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
            2023-11-29 23:31:43 0 [Note] InnoDB: Number of pools: 1
            2023-11-29 23:31:43 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
            2023-11-29 23:31:43 0 [Note] mariadbd: O_TMPFILE is not supported on /tmp (disabling future attempts)
            2023-11-29 23:31:43 0 [Note] InnoDB: Using Linux native AIO
            2023-11-29 23:31:43 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
            2023-11-29 23:31:43 0 [Note] InnoDB: Completed initialization of buffer pool
            2023-11-29 23:31:43 0 [Note] InnoDB: 128 rollback segments are active.
            2023-11-29 23:31:43 0 [ERROR] InnoDB: Table test/t1 in InnoDB data dictionary contains invalid flags. SYS_TABLES.TYPE=161 SYS_TABLES.N_COLS=2147483649
            2023-11-29 23:31:43 0 [Note] InnoDB: Creating shared tablespace for temporary tables
            2023-11-29 23:31:43 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
            2023-11-29 23:31:43 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
            2023-11-29 23:31:43 0 [Note] InnoDB: 10.6.16 started; log sequence number 12246560; transaction id 1828
            2023-11-29 23:31:43 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
            2023-11-29 23:31:43 0 [Note] Plugin 'FEEDBACK' is disabled.
            2023-11-29 23:31:43 0 [Warning] You need to use --log-bin to make --expire-logs-days or --binlog-expire-logs-seconds work.
            2023-11-29 23:31:43 0 [Note] InnoDB: Buffer pool(s) load completed at 231129 23:31:43
            2023-11-29 23:31:43 0 [Note] Server socket created on IP: '0.0.0.0'.
            2023-11-29 23:31:43 0 [Note] Server socket created on IP: '::'.
            2023-11-29 23:31:43 0 [Note] mariadbd: ready for connections.
            Version: '10.6.16-MariaDB-1:10.6.16+maria~ubu2004'  socket: '/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution
            

            So good news, no crash.

            $ podman exec -t m106 mariadb -ptest -u test test -e 'show tables'
            +----------------+
            | Tables_in_test |
            +----------------+
            | t1             |
            +----------------+
             
            $ podman exec -t m106 mariadb -ptest -u test test -e 'show create table t1'
            ERROR 1932 (42S02) at line 1: Table 'test.t1' doesn't exist in engine
             
            $ podman exec -t m106 mariadb -ptest -u test test -e 'select * from t1'
            ERROR 1932 (42S02) at line 1: Table 'test.t1' doesn't exist in engine
            

            danblack Daniel Black added a comment - - edited $ podman volume create m57 m57   $ vi d/m57.sql   $ cat d/m57.sql CREATE TABLESPACE space1 ADD DATAFILE 'space1f1.ibd'; CREATE TABLE t1 (i int) TABLESPACE space1; SHOW CREATE TABLE t1; INSERT INTO t1 VALUES (1),(2); SELECT * FROM t1;   $ podman run -v m57:/var/lib/mysql -v ./d:/docker-entrypoint-initdb.d:Z -e MYSQL_ROOT_PASSWORD=bob -e MYSQL_DATABASE=test -e MYSQL_USER=test -e MYSQL_PASSWORD=test --rm mysql:5.7 2023-11-29 23:30:49+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.44-1.el7 started. 2023-11-29 23:30:49+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql' 2023-11-29 23:30:49+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.44-1.el7 started. .... 2023-11-29 23:30:52+00:00 [Note] [Entrypoint]: Creating database test 2023-11-29 23:30:52+00:00 [Note] [Entrypoint]: Creating user test 2023-11-29 23:30:53+00:00 [Note] [Entrypoint]: Giving user test access to schema test   2023-11-29 23:30:53+00:00 [Note] [Entrypoint]: /usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/m57.sql Table Create Table t1 CREATE TABLE `t1` (\n `i` int(11) DEFAULT NULL\n) /*!50100 TABLESPACE `space1` */ ENGINE=InnoDB DEFAULT CHARSET=latin1 i 1 2     2023-11-29 23:30:53+00:00 [Note] [Entrypoint]: Stopping temporary server .... 2023-11-29T23:31:00.127796Z 0 [Note] mysqld: Shutdown complete     $ podman run -v m57:/var/lib/mysql/ -e MARIADB_AUTO_UPGRADE=1 --name m106 mariadb:10.6 2023-11-29 23:31:37+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.6.16+maria~ubu2004 started. 2023-11-29 23:31:39+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql' 2023-11-29 23:31:39+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.6.16+maria~ubu2004 started. 2023-11-29 23:31:40+00:00 [Note] [Entrypoint]: MariaDB upgrade information missing, assuming required 2023-11-29 23:31:40+00:00 [Note] [Entrypoint]: Starting temporary server 2023-11-29 23:31:40+00:00 [Note] [Entrypoint]: Waiting for server startup 2023-11-29 23:31:40 0 [Note] Starting MariaDB 10.6.16-MariaDB-1:10.6.16+maria~ubu2004 source revision b83c379420a8846ae4b28768d3c81fa354cca056 as process 103 2023-11-29 23:31:40 0 [Note] InnoDB: Compressed tables use zlib 1.2.11 2023-11-29 23:31:40 0 [Note] InnoDB: Number of pools: 1 2023-11-29 23:31:40 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions 2023-11-29 23:31:40 0 [Note] mariadbd: O_TMPFILE is not supported on /tmp (disabling future attempts) 2023-11-29 23:31:40 0 [Note] InnoDB: Using Linux native AIO 2023-11-29 23:31:40 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728 2023-11-29 23:31:40 0 [Note] InnoDB: Completed initialization of buffer pool 2023-11-29 23:31:40 0 [Note] InnoDB: 128 rollback segments are active. 2023-11-29 23:31:40 0 [ERROR] InnoDB: Table test/t1 in InnoDB data dictionary contains invalid flags. SYS_TABLES.TYPE=161 SYS_TABLES.N_COLS=2147483649 2023-11-29 23:31:40 0 [Note] InnoDB: Creating shared tablespace for temporary tables 2023-11-29 23:31:40 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ... 2023-11-29 23:31:40 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB. 2023-11-29 23:31:40 0 [Note] InnoDB: 10.6.16 started; log sequence number 12230849; transaction id 1794 2023-11-29 23:31:40 0 [Note] Plugin 'FEEDBACK' is disabled. 2023-11-29 23:31:40 1 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1146: Table 'mysql.gtid_slave_pos' doesn't exist 2023-11-29 23:31:40 0 [Note] mariadbd: ready for connections. Version: '10.6.16-MariaDB-1:10.6.16+maria~ubu2004' socket: '/run/mysqld/mysqld.sock' port: 0 mariadb.org binary distribution 2023-11-29 23:31:41+00:00 [Note] [Entrypoint]: Temporary server started. 2023-11-29 23:31:41+00:00 [Note] [Entrypoint]: Backing up system database to system_mysql_backup_unknown_version.sql.zst 2023-11-29 23:31:41+00:00 [Note] [Entrypoint]: Backing up complete 2023-11-29 23:31:41+00:00 [Note] [Entrypoint]: Starting mariadb-upgrade The --upgrade-system-tables option was used, user tables won't be touched. MariaDB upgrade detected Phase 1/8: Checking and upgrading mysql database Processing databases mysql mysql.columns_priv OK mysql.db OK mysql.engine_cost OK mysql.event OK mysql.func OK mysql.gtid_executed OK mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK mysql.innodb_index_stats OK mysql.innodb_table_stats OK mysql.ndb_binlog_index OK mysql.plugin OK mysql.proc OK mysql.procs_priv OK mysql.proxies_priv OK mysql.server_cost OK mysql.servers OK mysql.slave_master_info OK mysql.slave_relay_log_info OK mysql.slave_worker_info OK mysql.tables_priv OK mysql.time_zone OK mysql.time_zone_leap_second OK mysql.time_zone_name OK mysql.time_zone_transition OK mysql.time_zone_transition_type OK mysql.user OK Phase 2/8: Installing used storage engines... Skipped Phase 3/8: Running 'mysql_fix_privilege_tables' Phase 4/8: Fixing views from mysql mysql.user OK sys.host_summary OK sys.host_summary_by_file_io OK sys.host_summary_by_file_io_type OK sys.host_summary_by_stages OK sys.host_summary_by_statement_latency OK sys.host_summary_by_statement_type OK sys.innodb_buffer_stats_by_schema OK sys.innodb_buffer_stats_by_table OK sys.innodb_lock_waits OK sys.io_by_thread_by_latency OK sys.io_global_by_file_by_bytes OK sys.io_global_by_file_by_latency OK sys.io_global_by_wait_by_bytes OK sys.io_global_by_wait_by_latency OK sys.latest_file_io OK sys.memory_by_host_by_current_bytes OK sys.memory_by_thread_by_current_bytes OK sys.memory_by_user_by_current_bytes OK sys.memory_global_by_current_bytes OK sys.memory_global_total OK sys.metrics OK sys.processlist OK sys.ps_check_lost_instrumentation OK sys.schema_auto_increment_columns OK sys.schema_index_statistics OK sys.schema_object_overview OK sys.schema_redundant_indexes OK sys.schema_table_lock_waits OK sys.schema_table_statistics OK sys.schema_table_statistics_with_buffer OK sys.schema_tables_with_full_table_scans OK sys.schema_unused_indexes OK sys.session OK sys.session_ssl_status OK sys.statement_analysis OK sys.statements_with_errors_or_warnings OK sys.statements_with_full_table_scans OK sys.statements_with_runtimes_in_95th_percentile OK sys.statements_with_sorting OK sys.statements_with_temp_tables OK sys.user_summary OK sys.user_summary_by_file_io OK sys.user_summary_by_file_io_type OK sys.user_summary_by_stages OK sys.user_summary_by_statement_latency OK sys.user_summary_by_statement_type OK sys.version OK sys.wait_classes_global_by_avg_latency OK sys.wait_classes_global_by_latency OK sys.waits_by_host_by_latency OK sys.waits_by_user_by_latency OK sys.waits_global_by_latency OK sys.x$host_summary OK sys.x$host_summary_by_file_io OK sys.x$host_summary_by_file_io_type OK sys.x$host_summary_by_stages OK sys.x$host_summary_by_statement_latency OK sys.x$host_summary_by_statement_type OK sys.x$innodb_buffer_stats_by_schema OK sys.x$innodb_buffer_stats_by_table OK sys.x$innodb_lock_waits OK sys.x$io_by_thread_by_latency OK sys.x$io_global_by_file_by_bytes OK sys.x$io_global_by_file_by_latency OK sys.x$io_global_by_wait_by_bytes OK sys.x$io_global_by_wait_by_latency OK sys.x$latest_file_io OK sys.x$memory_by_host_by_current_bytes OK sys.x$memory_by_thread_by_current_bytes OK sys.x$memory_by_user_by_current_bytes OK sys.x$memory_global_by_current_bytes OK sys.x$memory_global_total OK sys.x$processlist OK sys.x$ps_digest_95th_percentile_by_avg_us OK sys.x$ps_digest_avg_latency_distribution OK sys.x$ps_schema_table_statistics_io OK sys.x$schema_flattened_keys OK sys.x$schema_index_statistics OK sys.x$schema_table_lock_waits OK sys.x$schema_table_statistics OK sys.x$schema_table_statistics_with_buffer OK sys.x$schema_tables_with_full_table_scans OK sys.x$session OK sys.x$statement_analysis OK sys.x$statements_with_errors_or_warnings OK sys.x$statements_with_full_table_scans OK sys.x$statements_with_runtimes_in_95th_percentile OK sys.x$statements_with_sorting OK sys.x$statements_with_temp_tables OK sys.x$user_summary OK sys.x$user_summary_by_file_io OK sys.x$user_summary_by_file_io_type OK sys.x$user_summary_by_stages OK sys.x$user_summary_by_statement_latency OK sys.x$user_summary_by_statement_type OK sys.x$wait_classes_global_by_avg_latency OK sys.x$wait_classes_global_by_latency OK sys.x$waits_by_host_by_latency OK sys.x$waits_by_user_by_latency OK sys.x$waits_global_by_latency OK Phase 5/8: Fixing table and database names ... Skipped Phase 6/8: Checking and upgrading tables... Skipped Phase 7/8: uninstalling plugins Phase 8/8: Running 'FLUSH PRIVILEGES' OK 2023-11-29 23:31:43+00:00 [Note] [Entrypoint]: Finished mariadb-upgrade 2023-11-29 23:31:43+00:00 [Note] [Entrypoint]: Stopping temporary server 2023-11-29 23:31:43 0 [Note] mariadbd (initiated by: unknown): Normal shutdown 2023-11-29 23:31:43 0 [Note] InnoDB: FTS optimize thread exiting. 2023-11-29 23:31:43 0 [Note] InnoDB: Starting shutdown... 2023-11-29 23:31:43 0 [Note] InnoDB: Removed temporary tablespace data file: "./ibtmp1" 2023-11-29 23:31:43 0 [Note] InnoDB: Shutdown completed; log sequence number 12246560; transaction id 1833 2023-11-29 23:31:43 0 [Note] mariadbd: Shutdown complete   2023-11-29 23:31:43+00:00 [Note] [Entrypoint]: Temporary server stopped 2023-11-29 23:31:43 0 [Note] Starting MariaDB 10.6.16-MariaDB-1:10.6.16+maria~ubu2004 source revision b83c379420a8846ae4b28768d3c81fa354cca056 as process 1 2023-11-29 23:31:43 0 [Note] InnoDB: Compressed tables use zlib 1.2.11 2023-11-29 23:31:43 0 [Note] InnoDB: Number of pools: 1 2023-11-29 23:31:43 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions 2023-11-29 23:31:43 0 [Note] mariadbd: O_TMPFILE is not supported on /tmp (disabling future attempts) 2023-11-29 23:31:43 0 [Note] InnoDB: Using Linux native AIO 2023-11-29 23:31:43 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728 2023-11-29 23:31:43 0 [Note] InnoDB: Completed initialization of buffer pool 2023-11-29 23:31:43 0 [Note] InnoDB: 128 rollback segments are active. 2023-11-29 23:31:43 0 [ERROR] InnoDB: Table test/t1 in InnoDB data dictionary contains invalid flags. SYS_TABLES.TYPE=161 SYS_TABLES.N_COLS=2147483649 2023-11-29 23:31:43 0 [Note] InnoDB: Creating shared tablespace for temporary tables 2023-11-29 23:31:43 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ... 2023-11-29 23:31:43 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB. 2023-11-29 23:31:43 0 [Note] InnoDB: 10.6.16 started; log sequence number 12246560; transaction id 1828 2023-11-29 23:31:43 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool 2023-11-29 23:31:43 0 [Note] Plugin 'FEEDBACK' is disabled. 2023-11-29 23:31:43 0 [Warning] You need to use --log-bin to make --expire-logs-days or --binlog-expire-logs-seconds work. 2023-11-29 23:31:43 0 [Note] InnoDB: Buffer pool(s) load completed at 231129 23:31:43 2023-11-29 23:31:43 0 [Note] Server socket created on IP: '0.0.0.0'. 2023-11-29 23:31:43 0 [Note] Server socket created on IP: '::'. 2023-11-29 23:31:43 0 [Note] mariadbd: ready for connections. Version: '10.6.16-MariaDB-1:10.6.16+maria~ubu2004' socket: '/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution So good news, no crash. $ podman exec -t m106 mariadb -ptest -u test test -e 'show tables' +----------------+ | Tables_in_test | +----------------+ | t1 | +----------------+   $ podman exec -t m106 mariadb -ptest -u test test -e 'show create table t1' ERROR 1932 (42S02) at line 1: Table 'test.t1' doesn't exist in engine   $ podman exec -t m106 mariadb -ptest -u test test -e 'select * from t1' ERROR 1932 (42S02) at line 1: Table 'test.t1' doesn't exist in engine
            danblack Daniel Black added a comment -

            10.4.32

            2023-11-29 23:43:07+00:00 [Note] [Entrypoint]: Temporary server stopped
            2023-11-29 23:43:07 0 [Note] Starting MariaDB 10.4.32-MariaDB-1:10.4.32+maria~ubu2004 source revision c4143f909528e3fab0677a28631d10389354c491 as process 1
            2023-11-29 23:43:07 0 [Note] InnoDB: Using Linux native AIO
            2023-11-29 23:43:07 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
            2023-11-29 23:43:07 0 [Note] InnoDB: Uses event mutexes
            2023-11-29 23:43:07 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
            2023-11-29 23:43:07 0 [Note] InnoDB: Number of pools: 1
            2023-11-29 23:43:07 0 [Note] InnoDB: Using SSE2 crc32 instructions
            2023-11-29 23:43:07 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
            2023-11-29 23:43:07 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M
            2023-11-29 23:43:07 0 [Note] InnoDB: Completed initialization of buffer pool
            2023-11-29 23:43:07 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
            2023-11-29 23:43:07 0 [ERROR] InnoDB: Table `test`.`t1` in InnoDB data dictionary contains invalid flags. SYS_TABLES.TYPE=161 SYS_TABLES.N_COLS=2147483649
            2023-11-29 23:43:07 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
            2023-11-29 23:43:07 0 [Note] InnoDB: Creating shared tablespace for temporary tables
            2023-11-29 23:43:07 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
            2023-11-29 23:43:07 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
            2023-11-29 23:43:07 0 [Note] InnoDB: Waiting for purge to start
            2023-11-29 23:43:07 0 [Note] InnoDB: 10.4.32 started; log sequence number 12271459; transaction id 1856
            2023-11-29 23:43:07 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
            2023-11-29 23:43:07 0 [Note] Plugin 'FEEDBACK' is disabled.
            2023-11-29 23:43:07 0 [Note] Server socket created on IP: '::'.
            2023-11-29 23:43:07 0 [Note] InnoDB: Buffer pool(s) load completed at 231129 23:43:07
            2023-11-29 23:43:07 6 [ERROR] InnoDB: Column last_update in table `mysql`.`innodb_table_stats` is BINARY(4) NOT NULL but should be INT UNSIGNED NOT NULL (flags mismatch).
            2023-11-29 23:43:07 6 [ERROR] InnoDB: Fetch of persistent statistics requested for table `mysql`.`gtid_slave_pos` but the required system tables mysql.innodb_table_stats and mysql.innodb_index_stats are not present or have unexpected structure. Using transient stats instead.
            2023-11-29 23:43:07 0 [Note] Reading of all Master_info entries succeeded
            2023-11-29 23:43:07 0 [Note] Added new Master_info '' to hash table
            2023-11-29 23:43:07 0 [Note] mysqld: ready for connections.
            Version: '10.4.32-MariaDB-1:10.4.32+maria~ubu2004'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution
            

            Incidently same with 10.3.39

            danblack Daniel Black added a comment - 10.4.32 2023-11-29 23:43:07+00:00 [Note] [Entrypoint]: Temporary server stopped 2023-11-29 23:43:07 0 [Note] Starting MariaDB 10.4.32-MariaDB-1:10.4.32+maria~ubu2004 source revision c4143f909528e3fab0677a28631d10389354c491 as process 1 2023-11-29 23:43:07 0 [Note] InnoDB: Using Linux native AIO 2023-11-29 23:43:07 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2023-11-29 23:43:07 0 [Note] InnoDB: Uses event mutexes 2023-11-29 23:43:07 0 [Note] InnoDB: Compressed tables use zlib 1.2.11 2023-11-29 23:43:07 0 [Note] InnoDB: Number of pools: 1 2023-11-29 23:43:07 0 [Note] InnoDB: Using SSE2 crc32 instructions 2023-11-29 23:43:07 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts) 2023-11-29 23:43:07 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M 2023-11-29 23:43:07 0 [Note] InnoDB: Completed initialization of buffer pool 2023-11-29 23:43:07 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority(). 2023-11-29 23:43:07 0 [ERROR] InnoDB: Table `test`.`t1` in InnoDB data dictionary contains invalid flags. SYS_TABLES.TYPE=161 SYS_TABLES.N_COLS=2147483649 2023-11-29 23:43:07 0 [Note] InnoDB: 128 out of 128 rollback segments are active. 2023-11-29 23:43:07 0 [Note] InnoDB: Creating shared tablespace for temporary tables 2023-11-29 23:43:07 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ... 2023-11-29 23:43:07 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB. 2023-11-29 23:43:07 0 [Note] InnoDB: Waiting for purge to start 2023-11-29 23:43:07 0 [Note] InnoDB: 10.4.32 started; log sequence number 12271459; transaction id 1856 2023-11-29 23:43:07 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool 2023-11-29 23:43:07 0 [Note] Plugin 'FEEDBACK' is disabled. 2023-11-29 23:43:07 0 [Note] Server socket created on IP: '::'. 2023-11-29 23:43:07 0 [Note] InnoDB: Buffer pool(s) load completed at 231129 23:43:07 2023-11-29 23:43:07 6 [ERROR] InnoDB: Column last_update in table `mysql`.`innodb_table_stats` is BINARY(4) NOT NULL but should be INT UNSIGNED NOT NULL (flags mismatch). 2023-11-29 23:43:07 6 [ERROR] InnoDB: Fetch of persistent statistics requested for table `mysql`.`gtid_slave_pos` but the required system tables mysql.innodb_table_stats and mysql.innodb_index_stats are not present or have unexpected structure. Using transient stats instead. 2023-11-29 23:43:07 0 [Note] Reading of all Master_info entries succeeded 2023-11-29 23:43:07 0 [Note] Added new Master_info '' to hash table 2023-11-29 23:43:07 0 [Note] mysqld: ready for connections. Version: '10.4.32-MariaDB-1:10.4.32+maria~ubu2004' socket: '/var/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution Incidently same with 10.3.39

            People

              marko Marko Mäkelä
              elenst Elena Stepanova
              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.