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

Discard/Import Tablespace, Restart, Index Corruption

Details

    Description

      We utilize mariabackup for partial backup and restore operations. However, our automated restore tests have encountered failures at times due to corrupted indexes. After some investigation, I have isolated the issue. It appears not to be a problem with mariabackup or the backup itself, as I was able to reproduce the issue on a local instance as well.

      #1 Test Case:

      Backup the database files:

      rsync -av /var/lib/mysql/db1 /var/tmp/
      

      Recreate database db1:

      DROP DATABASE db1;
      CREATE DATABASE db1;
      

      Create the database schema without secondary indexes (excerpt):

      CREATE TABLE `questionnaire` (
        `id` varchar(64) NOT NULL,
         .....
        `created` datetime DEFAULT NULL,
        `updated` datetime DEFAULT NULL,
        `deleted` tinyint(1) unsigned NOT NULL DEFAULT 0,
        PRIMARY KEY (`id`)
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
      

      ALTER TABLE `questionnaire` DISCARD TABLESPACE;
      

      cp -p /var/tmp/db1/*.ibd /var/lib/mysql/db1/
      

      ALTER TABLE `questionnaire` IMPORT TABLESPACE;
      

      Check database integrity before restart:

      mysqlcheck db1 questionnaire
       
      db1.questionnaire: OK
      

      Check database integrity after restart:

      mysqlcheck db1 questionnaire
      db1.questionnaire: Warning: InnoDB: Index PRIMARY is marked as corrupted
      error: Corrupt
      

      #2 Test Case:

      In this case, I considered what would happen if I removed the PRIMARY KEY from the table definition. The steps are the same as above, but without the PRIMARY KEY (id).

      This led to a crash:

      2024-02-21 10:22:28 37 [ERROR] InnoDB: Trying to read 16384 bytes at 15225848610816 outside the bounds of the file: ./db1/questionnaire.ibd
      2024-02-21 10:22:28 37 [ERROR] InnoDB: File './db1/questionnaire.ibd' is corrupted
      2024-02-21 10:22:28 37 [Note] InnoDB: Phase III - Flush changes to disk
      2024-02-21 10:22:28 37 [Note] InnoDB: Phase IV - Flush complete
      2024-02-21 10:22:28 37 [ERROR] InnoDB: Trying to read 16384 bytes at 13850385334272 outside the bounds of the file: ./db1/questionnaire.ibd
      2024-02-21 10:22:28 37 [ERROR] InnoDB: Trying to read 16384 bytes at 13850385334272 outside the bounds of the file: ./db1/questionnaire.ibd
      240221 10:22:28 [ERROR] mysqld got signal 8 ;
      This could be because you hit a bug. It is also possible that this binary
      or one of the libraries it was linked against is corrupt, improperly built,
      or misconfigured. This error can also be caused by malfunctioning hardware.
       
      To report this bug, see https://mariadb.com/kb/en/reporting-bugs
       
      We will try our best to scrape up some info that will hopefully help
      diagnose the problem, but since we have already crashed, 
      something is definitely wrong and this may fail.
       
      Server version: 10.6.15-MariaDB-1:10.6.15+maria~deb11 source revision: 0d16eb35bc981023ce2f4912e8ecde68ca381f4e
      key_buffer_size=134217728
      read_buffer_size=131072
      max_used_connections=1
      max_threads=153
      thread_count=1
      It is possible that mysqld could use up to 
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 467985 K  bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.
       
      Thread pointer: 0x7f2cd8000c58
      Attempting backtrace. You can use the following information to find out
      where mysqld died. If you see no messages after this, something went
      terribly wrong...
      stack_bottom = 0x7f2d67ffecd8 thread_stack 0x49000
      Printing to addr2line failed
      /usr/sbin/mariadbd(my_print_stacktrace+0x2e)[0x55846a04f2ee]
      /usr/sbin/mariadbd(handle_fatal_signal+0x485)[0x558469b14825]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x13140)[0x7f2d6e1c0140]
      /usr/sbin/mariadbd(+0xe664f3)[0x558469f844f3]
      /usr/sbin/mariadbd(+0xe6845b)[0x558469f8645b]
      /usr/sbin/mariadbd(+0xcfb233)[0x558469e19233]
      /usr/sbin/mariadbd(_Z34mysql_discard_or_import_tablespaceP3THDP10TABLE_LISTb+0xf9)[0x5584699787f9]
      /usr/sbin/mariadbd(_ZN33Sql_cmd_discard_import_tablespace7executeEP3THD+0xac)[0x5584699f0fec]
      /usr/sbin/mariadbd(_Z21mysql_execute_commandP3THDb+0x4a7e)[0x5584698d7b3e]
      /usr/sbin/mariadbd(_Z11mysql_parseP3THDPcjP12Parser_state+0x1e7)[0x5584698d8d67]
      /usr/sbin/mariadbd(_Z16dispatch_command19enum_server_commandP3THDPcjb+0x156d)[0x5584698db5fd]
      /usr/sbin/mariadbd(_Z10do_commandP3THDb+0x138)[0x5584698dd328]
      /usr/sbin/mariadbd(_Z24do_handle_one_connectionP7CONNECTb+0x3af)[0x5584699ec9af]
      /usr/sbin/mariadbd(handle_one_connection+0x5d)[0x5584699eccfd]
      /usr/sbin/mariadbd(+0xc43ce2)[0x558469d61ce2]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x7ea7)[0x7f2d6e1b4ea7]
      /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f)[0x7f2d6ddbba2f]
       
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x7f2cd8010be0): ALTER TABLE `questionnaire` IMPORT TABLESPACE
       
      Connection ID (thread ID): 37
      Status: NOT_KILLED
       
      Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on,not_null_range_scan=off,hash_join_cardinality=off
       
      The manual page at https://mariadb.com/kb/en/how-to-produce-a-full-stack-trace-for-mysqld/ contains
      information that should help you find out what is causing the crash.
      Writing a core file...
      Working directory at /var/lib/mysql
      Resource Limits:
      Limit                     Soft Limit           Hard Limit           Units     
      Max cpu time              unlimited            unlimited            seconds   
      Max file size             unlimited            unlimited            bytes     
      Max data size             unlimited            unlimited            bytes     
      Max stack size            8388608              unlimited            bytes     
      Max core file size        unlimited            unlimited            bytes     
      Max resident set          unlimited            unlimited            bytes     
      Max processes             unlimited            unlimited            processes 
      Max open files            1073741816           1073741816           files     
      Max locked memory         8388608              8388608              bytes     
      Max address space         unlimited            unlimited            bytes     
      Max file locks            unlimited            unlimited            locks     
      Max pending signals       126657               126657               signals   
      Max msgqueue size         819200               819200               bytes     
      Max nice priority         0                    0                    
      Max realtime priority     0                    0                    
      Max realtime timeout      unlimited            unlimited            us        
      Core pattern: |/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h
       
      Kernel version: Linux version 6.7.4-200.fc39.x86_64 (mockbuild@de0c58eb5f524c20963d3b29334043cc) (gcc (GCC) 13.2.1 20231205 (Red Hat 13.2.1-6), GNU ld version 2.40-14.fc39) #1 SMP PREEMPT_DYNAMIC Mon Feb  5 22:21:14 UTC 2024
      

      Attachments

        Issue Links

          Activity

            wursterje Jens Wurster created issue -

            Thank you for the report.

            On a quick read, it seems to me that the rsync command was executed on files that were not in a ‘clean’ state. Only after the database server had been shut down normally (or mariadb-backup --prepare run on a previously made backup) it is safe to copy data files. Alternatively, you could possibly execute

            FLUSH TABLES db1.* FOR EXPORT;
            

            before executing the rsync command and

            UNLOCK TABLES;
            

            after the db1/*.ibd files had been copied.

            The only other scenario where a file copying tool like rsync is safe to use is when writes to ib_logfile0 and all InnoDB data files are blocked (as in Galera snapshot transfer with wsrep_sst_method=rsync), or when using a file system snapshot. On such a copy, InnoDB crash recovery needs to be invoked by starting MariaDB on the copy of the data directory. That is only possible if you also copy the ib_logfile0 and the InnoDB system tablespace (named ibdata1 by default).

            Possibly you could get this workflow a little safer (still not safe) by configuring InnoDB so that changed data files are written more often back to the data files. See MDEV-30000 for some discussion around that.

            Can you check if this works when using FLUSH TABLES…FOR EXPORT?

            marko Marko Mäkelä added a comment - Thank you for the report. On a quick read, it seems to me that the rsync command was executed on files that were not in a ‘clean’ state. Only after the database server had been shut down normally (or mariadb-backup --prepare run on a previously made backup) it is safe to copy data files. Alternatively, you could possibly execute FLUSH TABLES db1.* FOR EXPORT; before executing the rsync command and UNLOCK TABLES; after the db1/*.ibd files had been copied. The only other scenario where a file copying tool like rsync is safe to use is when writes to ib_logfile0 and all InnoDB data files are blocked (as in Galera snapshot transfer with wsrep_sst_method=rsync ), or when using a file system snapshot. On such a copy, InnoDB crash recovery needs to be invoked by starting MariaDB on the copy of the data directory. That is only possible if you also copy the ib_logfile0 and the InnoDB system tablespace (named ibdata1 by default). Possibly you could get this workflow a little safer (still not safe) by configuring InnoDB so that changed data files are written more often back to the data files. See MDEV-30000 for some discussion around that. Can you check if this works when using FLUSH TABLES…FOR EXPORT ?
            marko Marko Mäkelä made changes -
            Field Original Value New Value
            Assignee Marko Mäkelä [ marko ]
            Status Open [ 1 ] Needs Feedback [ 10501 ]

            The SIGFPE (signal 8) could be the result of a division by zero. We would need a resolved stack trace of the crashing thread to find out the cause. https://mariadb.com/kb/en/how-to-produce-a-full-stack-trace-for-mariadbd/ explains how. I think that this bug could be still there in the currently latest 10.6.17 release; MDEV-29972 had fixed a SIGSEGV, not SIGFPE.

            For importing tablespaces, you should also copy the .cfg files so that some additional consistency checks can be performed. InnoDB tables are always index-organized, so an incorrect definition of a PRIMARY KEY will lead to total failure to access data files. When there is no PRIMARY KEY, InnoDB will create a hidden one, using a 48-bit counter as the primary key.

            marko Marko Mäkelä added a comment - The SIGFPE (signal 8) could be the result of a division by zero. We would need a resolved stack trace of the crashing thread to find out the cause. https://mariadb.com/kb/en/how-to-produce-a-full-stack-trace-for-mariadbd/ explains how. I think that this bug could be still there in the currently latest 10.6.17 release; MDEV-29972 had fixed a SIGSEGV, not SIGFPE. For importing tablespaces, you should also copy the .cfg files so that some additional consistency checks can be performed. InnoDB tables are always index-organized, so an incorrect definition of a PRIMARY KEY will lead to total failure to access data files. When there is no PRIMARY KEY , InnoDB will create a hidden one, using a 48-bit counter as the primary key.
            wursterje Jens Wurster made changes -
            Attachment stacktrace.txt [ 73179 ]
            wursterje Jens Wurster added a comment - - edited

            Ok, new test case with "clean state" (sorry, for missing that, I should actually know that).

            #3 Test Case

            • Check database integrity

            mysqlcheck db1 questionnaire
            db1.questionnaire: OK
            

            • Stop MariaDB
            • Backup the database files:

            rsync -av /var/lib/mysql/db1 /var/tmp/
            

            • Start MariaDB
            • Recreate database db1:

            DROP DATABASE db1;
            CREATE DATABASE db1;
            

            • Create the database schema without secondary indexes (excerpt):

            CREATE TABLE `questionnaire` (
              `id` varchar(64) NOT NULL,
               .....
              `created` datetime DEFAULT NULL,
              `updated` datetime DEFAULT NULL,
              `deleted` tinyint(1) unsigned NOT NULL DEFAULT 0,
              PRIMARY KEY (`id`)
            ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
            

            ALTER TABLE `questionnaire` DISCARD TABLESPACE;
            

            cp -p /var/tmp/db1/*.ibd /var/lib/mysql/db1/
            

            ALTER TABLE `questionnaire` IMPORT TABLESPACE;
            

            • Check database integrity:

            mysqlcheck db1 questionnaire
            Warning  : InnoDB: The B-tree of index PRIMARY is corrupted.
            error    : Corrupt
            

            Is there any way to debug this further? Why could the PRIMARY key gets corrupted? It happens on two tables.

            For the second case I've attached a stack trace.

            stacktrace.txt

            wursterje Jens Wurster added a comment - - edited Ok, new test case with "clean state" (sorry, for missing that, I should actually know that). #3 Test Case Check database integrity mysqlcheck db1 questionnaire db1.questionnaire: OK Stop MariaDB Backup the database files: rsync -av /var/lib/mysql/db1 /var/tmp/ Start MariaDB Recreate database db1: DROP DATABASE db1; CREATE DATABASE db1; Create the database schema without secondary indexes (excerpt): CREATE TABLE `questionnaire` ( `id` varchar(64) NOT NULL, ..... `created` datetime DEFAULT NULL, `updated` datetime DEFAULT NULL, `deleted` tinyint(1) unsigned NOT NULL DEFAULT 0, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; ALTER TABLE `questionnaire` DISCARD TABLESPACE; cp -p /var/tmp/db1/*.ibd /var/lib/mysql/db1/ ALTER TABLE `questionnaire` IMPORT TABLESPACE; Check database integrity: mysqlcheck db1 questionnaire Warning : InnoDB: The B-tree of index PRIMARY is corrupted. error : Corrupt Is there any way to debug this further? Why could the PRIMARY key gets corrupted? It happens on two tables. For the second case I've attached a stack trace. stacktrace.txt
            wursterje Jens Wurster made changes -
            Description We utilize mariabackup for partial backup and restore operations. However, our automated restore tests have encountered failures at times due to corrupted indexes. After some investigation, I have isolated the issue. It appears not to be a problem with mariabackup or the backup itself, as I was able to reproduce the issue on a local instance as well.

            #1 Test Case:

            Backup the database files:

            {code}
            rsync -an /var/lib/mysql/db1 /var/tmp/
            {code}

            Recreate database db1:

            {code}
            DROP DATABASE db1;
            CREATE DATABASE db1;
            {code}

            Create the database schema without secondary indexes (excerpt):

            {code}
            CREATE TABLE `questionnaire` (
              `id` varchar(64) NOT NULL,
               .....
              `created` datetime DEFAULT NULL,
              `updated` datetime DEFAULT NULL,
              `deleted` tinyint(1) unsigned NOT NULL DEFAULT 0,
              PRIMARY KEY (`id`)
            ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
            {code}

            {code}
            ALTER TABLE `questionnaire` DISCARD TABLESPACE;
            {code}

            {code}
            cp -p /var/tmp/db1/*.ibd /var/lib/mysql/db1/
            {code}

            {code}
            ALTER TABLE `questionnaire` IMPORT TABLESPACE;
            {code}

            Check database integrity before restart:

            {code}
            mysqlcheck db1 questionnaire

            db1.questionnaire: OK
            {code}

            Check database integrity after restart:

            {code}
            mysqlcheck db1 questionnaire
            db1.questionnaire: Warning: InnoDB: Index PRIMARY is marked as corrupted
            error: Corrupt
            {code}

            #2 Test Case:

            In this case, I considered what would happen if I removed the PRIMARY KEY from the table definition. The steps are the same as above, but without the PRIMARY KEY (id).

            This led to a crash:

            {noformat}
            2024-02-21 10:22:28 37 [ERROR] InnoDB: Trying to read 16384 bytes at 15225848610816 outside the bounds of the file: ./db1/questionnaire.ibd
            2024-02-21 10:22:28 37 [ERROR] InnoDB: File './db1/questionnaire.ibd' is corrupted
            2024-02-21 10:22:28 37 [Note] InnoDB: Phase III - Flush changes to disk
            2024-02-21 10:22:28 37 [Note] InnoDB: Phase IV - Flush complete
            2024-02-21 10:22:28 37 [ERROR] InnoDB: Trying to read 16384 bytes at 13850385334272 outside the bounds of the file: ./db1/questionnaire.ibd
            2024-02-21 10:22:28 37 [ERROR] InnoDB: Trying to read 16384 bytes at 13850385334272 outside the bounds of the file: ./db1/questionnaire.ibd
            240221 10:22:28 [ERROR] mysqld got signal 8 ;
            This could be because you hit a bug. It is also possible that this binary
            or one of the libraries it was linked against is corrupt, improperly built,
            or misconfigured. This error can also be caused by malfunctioning hardware.

            To report this bug, see https://mariadb.com/kb/en/reporting-bugs

            We will try our best to scrape up some info that will hopefully help
            diagnose the problem, but since we have already crashed,
            something is definitely wrong and this may fail.

            Server version: 10.6.15-MariaDB-1:10.6.15+maria~deb11 source revision: 0d16eb35bc981023ce2f4912e8ecde68ca381f4e
            key_buffer_size=134217728
            read_buffer_size=131072
            max_used_connections=1
            max_threads=153
            thread_count=1
            It is possible that mysqld could use up to
            key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 467985 K bytes of memory
            Hope that's ok; if not, decrease some variables in the equation.

            Thread pointer: 0x7f2cd8000c58
            Attempting backtrace. You can use the following information to find out
            where mysqld died. If you see no messages after this, something went
            terribly wrong...
            stack_bottom = 0x7f2d67ffecd8 thread_stack 0x49000
            Printing to addr2line failed
            /usr/sbin/mariadbd(my_print_stacktrace+0x2e)[0x55846a04f2ee]
            /usr/sbin/mariadbd(handle_fatal_signal+0x485)[0x558469b14825]
            /lib/x86_64-linux-gnu/libpthread.so.0(+0x13140)[0x7f2d6e1c0140]
            /usr/sbin/mariadbd(+0xe664f3)[0x558469f844f3]
            /usr/sbin/mariadbd(+0xe6845b)[0x558469f8645b]
            /usr/sbin/mariadbd(+0xcfb233)[0x558469e19233]
            /usr/sbin/mariadbd(_Z34mysql_discard_or_import_tablespaceP3THDP10TABLE_LISTb+0xf9)[0x5584699787f9]
            /usr/sbin/mariadbd(_ZN33Sql_cmd_discard_import_tablespace7executeEP3THD+0xac)[0x5584699f0fec]
            /usr/sbin/mariadbd(_Z21mysql_execute_commandP3THDb+0x4a7e)[0x5584698d7b3e]
            /usr/sbin/mariadbd(_Z11mysql_parseP3THDPcjP12Parser_state+0x1e7)[0x5584698d8d67]
            /usr/sbin/mariadbd(_Z16dispatch_command19enum_server_commandP3THDPcjb+0x156d)[0x5584698db5fd]
            /usr/sbin/mariadbd(_Z10do_commandP3THDb+0x138)[0x5584698dd328]
            /usr/sbin/mariadbd(_Z24do_handle_one_connectionP7CONNECTb+0x3af)[0x5584699ec9af]
            /usr/sbin/mariadbd(handle_one_connection+0x5d)[0x5584699eccfd]
            /usr/sbin/mariadbd(+0xc43ce2)[0x558469d61ce2]
            /lib/x86_64-linux-gnu/libpthread.so.0(+0x7ea7)[0x7f2d6e1b4ea7]
            /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f)[0x7f2d6ddbba2f]

            Trying to get some variables.
            Some pointers may be invalid and cause the dump to abort.
            Query (0x7f2cd8010be0): ALTER TABLE `questionnaire` IMPORT TABLESPACE

            Connection ID (thread ID): 37
            Status: NOT_KILLED

            Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on,not_null_range_scan=off,hash_join_cardinality=off

            The manual page at https://mariadb.com/kb/en/how-to-produce-a-full-stack-trace-for-mysqld/ contains
            information that should help you find out what is causing the crash.
            Writing a core file...
            Working directory at /var/lib/mysql
            Resource Limits:
            Limit Soft Limit Hard Limit Units
            Max cpu time unlimited unlimited seconds
            Max file size unlimited unlimited bytes
            Max data size unlimited unlimited bytes
            Max stack size 8388608 unlimited bytes
            Max core file size unlimited unlimited bytes
            Max resident set unlimited unlimited bytes
            Max processes unlimited unlimited processes
            Max open files 1073741816 1073741816 files
            Max locked memory 8388608 8388608 bytes
            Max address space unlimited unlimited bytes
            Max file locks unlimited unlimited locks
            Max pending signals 126657 126657 signals
            Max msgqueue size 819200 819200 bytes
            Max nice priority 0 0
            Max realtime priority 0 0
            Max realtime timeout unlimited unlimited us
            Core pattern: |/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h

            Kernel version: Linux version 6.7.4-200.fc39.x86_64 (mockbuild@de0c58eb5f524c20963d3b29334043cc) (gcc (GCC) 13.2.1 20231205 (Red Hat 13.2.1-6), GNU ld version 2.40-14.fc39) #1 SMP PREEMPT_DYNAMIC Mon Feb 5 22:21:14 UTC 2024
            {noformat}
            We utilize mariabackup for partial backup and restore operations. However, our automated restore tests have encountered failures at times due to corrupted indexes. After some investigation, I have isolated the issue. It appears not to be a problem with mariabackup or the backup itself, as I was able to reproduce the issue on a local instance as well.

            #1 Test Case:

            Backup the database files:

            {code}
            rsync -av /var/lib/mysql/db1 /var/tmp/
            {code}

            Recreate database db1:

            {code}
            DROP DATABASE db1;
            CREATE DATABASE db1;
            {code}

            Create the database schema without secondary indexes (excerpt):

            {code}
            CREATE TABLE `questionnaire` (
              `id` varchar(64) NOT NULL,
               .....
              `created` datetime DEFAULT NULL,
              `updated` datetime DEFAULT NULL,
              `deleted` tinyint(1) unsigned NOT NULL DEFAULT 0,
              PRIMARY KEY (`id`)
            ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
            {code}

            {code}
            ALTER TABLE `questionnaire` DISCARD TABLESPACE;
            {code}

            {code}
            cp -p /var/tmp/db1/*.ibd /var/lib/mysql/db1/
            {code}

            {code}
            ALTER TABLE `questionnaire` IMPORT TABLESPACE;
            {code}

            Check database integrity before restart:

            {code}
            mysqlcheck db1 questionnaire

            db1.questionnaire: OK
            {code}

            Check database integrity after restart:

            {code}
            mysqlcheck db1 questionnaire
            db1.questionnaire: Warning: InnoDB: Index PRIMARY is marked as corrupted
            error: Corrupt
            {code}

            #2 Test Case:

            In this case, I considered what would happen if I removed the PRIMARY KEY from the table definition. The steps are the same as above, but without the PRIMARY KEY (id).

            This led to a crash:

            {noformat}
            2024-02-21 10:22:28 37 [ERROR] InnoDB: Trying to read 16384 bytes at 15225848610816 outside the bounds of the file: ./db1/questionnaire.ibd
            2024-02-21 10:22:28 37 [ERROR] InnoDB: File './db1/questionnaire.ibd' is corrupted
            2024-02-21 10:22:28 37 [Note] InnoDB: Phase III - Flush changes to disk
            2024-02-21 10:22:28 37 [Note] InnoDB: Phase IV - Flush complete
            2024-02-21 10:22:28 37 [ERROR] InnoDB: Trying to read 16384 bytes at 13850385334272 outside the bounds of the file: ./db1/questionnaire.ibd
            2024-02-21 10:22:28 37 [ERROR] InnoDB: Trying to read 16384 bytes at 13850385334272 outside the bounds of the file: ./db1/questionnaire.ibd
            240221 10:22:28 [ERROR] mysqld got signal 8 ;
            This could be because you hit a bug. It is also possible that this binary
            or one of the libraries it was linked against is corrupt, improperly built,
            or misconfigured. This error can also be caused by malfunctioning hardware.

            To report this bug, see https://mariadb.com/kb/en/reporting-bugs

            We will try our best to scrape up some info that will hopefully help
            diagnose the problem, but since we have already crashed,
            something is definitely wrong and this may fail.

            Server version: 10.6.15-MariaDB-1:10.6.15+maria~deb11 source revision: 0d16eb35bc981023ce2f4912e8ecde68ca381f4e
            key_buffer_size=134217728
            read_buffer_size=131072
            max_used_connections=1
            max_threads=153
            thread_count=1
            It is possible that mysqld could use up to
            key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 467985 K bytes of memory
            Hope that's ok; if not, decrease some variables in the equation.

            Thread pointer: 0x7f2cd8000c58
            Attempting backtrace. You can use the following information to find out
            where mysqld died. If you see no messages after this, something went
            terribly wrong...
            stack_bottom = 0x7f2d67ffecd8 thread_stack 0x49000
            Printing to addr2line failed
            /usr/sbin/mariadbd(my_print_stacktrace+0x2e)[0x55846a04f2ee]
            /usr/sbin/mariadbd(handle_fatal_signal+0x485)[0x558469b14825]
            /lib/x86_64-linux-gnu/libpthread.so.0(+0x13140)[0x7f2d6e1c0140]
            /usr/sbin/mariadbd(+0xe664f3)[0x558469f844f3]
            /usr/sbin/mariadbd(+0xe6845b)[0x558469f8645b]
            /usr/sbin/mariadbd(+0xcfb233)[0x558469e19233]
            /usr/sbin/mariadbd(_Z34mysql_discard_or_import_tablespaceP3THDP10TABLE_LISTb+0xf9)[0x5584699787f9]
            /usr/sbin/mariadbd(_ZN33Sql_cmd_discard_import_tablespace7executeEP3THD+0xac)[0x5584699f0fec]
            /usr/sbin/mariadbd(_Z21mysql_execute_commandP3THDb+0x4a7e)[0x5584698d7b3e]
            /usr/sbin/mariadbd(_Z11mysql_parseP3THDPcjP12Parser_state+0x1e7)[0x5584698d8d67]
            /usr/sbin/mariadbd(_Z16dispatch_command19enum_server_commandP3THDPcjb+0x156d)[0x5584698db5fd]
            /usr/sbin/mariadbd(_Z10do_commandP3THDb+0x138)[0x5584698dd328]
            /usr/sbin/mariadbd(_Z24do_handle_one_connectionP7CONNECTb+0x3af)[0x5584699ec9af]
            /usr/sbin/mariadbd(handle_one_connection+0x5d)[0x5584699eccfd]
            /usr/sbin/mariadbd(+0xc43ce2)[0x558469d61ce2]
            /lib/x86_64-linux-gnu/libpthread.so.0(+0x7ea7)[0x7f2d6e1b4ea7]
            /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f)[0x7f2d6ddbba2f]

            Trying to get some variables.
            Some pointers may be invalid and cause the dump to abort.
            Query (0x7f2cd8010be0): ALTER TABLE `questionnaire` IMPORT TABLESPACE

            Connection ID (thread ID): 37
            Status: NOT_KILLED

            Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on,not_null_range_scan=off,hash_join_cardinality=off

            The manual page at https://mariadb.com/kb/en/how-to-produce-a-full-stack-trace-for-mysqld/ contains
            information that should help you find out what is causing the crash.
            Writing a core file...
            Working directory at /var/lib/mysql
            Resource Limits:
            Limit Soft Limit Hard Limit Units
            Max cpu time unlimited unlimited seconds
            Max file size unlimited unlimited bytes
            Max data size unlimited unlimited bytes
            Max stack size 8388608 unlimited bytes
            Max core file size unlimited unlimited bytes
            Max resident set unlimited unlimited bytes
            Max processes unlimited unlimited processes
            Max open files 1073741816 1073741816 files
            Max locked memory 8388608 8388608 bytes
            Max address space unlimited unlimited bytes
            Max file locks unlimited unlimited locks
            Max pending signals 126657 126657 signals
            Max msgqueue size 819200 819200 bytes
            Max nice priority 0 0
            Max realtime priority 0 0
            Max realtime timeout unlimited unlimited us
            Core pattern: |/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h

            Kernel version: Linux version 6.7.4-200.fc39.x86_64 (mockbuild@de0c58eb5f524c20963d3b29334043cc) (gcc (GCC) 13.2.1 20231205 (Red Hat 13.2.1-6), GNU ld version 2.40-14.fc39) #1 SMP PREEMPT_DYNAMIC Mon Feb 5 22:21:14 UTC 2024
            {noformat}
            bluebike Jukka Pihl added a comment - - edited

            I think marko was saying that when you do export ,
            you have to have having
            FLUSH TABLES db1.* FOR EXPORT; runnning and not executed UNLOCK TABLES; in same session. If session ends UNLOCK TABLES is executed automatically.

            Check that you get also *.cfg - files. I think those are deleted when tables are unlocked.

            Second, when you create table. I think that you must have all things similar in table definition as in source.
            I have seen cases (with old tables) that `show create table ... ` doesn't give enough information for CRETE TABLE like missing ROW_FORMAT (can get from information_schema.tables).

            Also DATIME/TIME/TIMESTAMP columns have been using pre-mysql.5.6 format, which cannot be told in create table - statement.

            bluebike Jukka Pihl added a comment - - edited I think marko was saying that when you do export , you have to have having FLUSH TABLES db1.* FOR EXPORT; runnning and not executed UNLOCK TABLES; in same session. If session ends UNLOCK TABLES is executed automatically. Check that you get also *.cfg - files. I think those are deleted when tables are unlocked. Second, when you create table. I think that you must have all things similar in table definition as in source. I have seen cases (with old tables) that `show create table ... ` doesn't give enough information for CRETE TABLE like missing ROW_FORMAT (can get from information_schema.tables). Also DATIME/TIME/TIMESTAMP columns have been using pre-mysql.5.6 format, which cannot be told in create table - statement.
            wursterje Jens Wurster added a comment - - edited

            Our primary issue is that the restoration of our partial backups, created with mariabackup, fails.

            The restoration process briefly:

            1. /usr/bin/mariabackup --prepare --target-dir $RESTORE_TMP_PATH --incremental-dir $RESTORE_TMP_PATH/$INCREMENTAL_DIR/
            2. Creating a fresh database with a schema exported from mysqldump.
            3. Discarding tablespace for tables.
            4. Moving .ibd files from the restore temporary path to the database directory.
            5. Importing tablespace.
            6. Performing a row count for verification: questionnaire 167446
            7. Doing a mysqlcheck for verification: db1.questionnaire OK
            8. Everything seems fine, but after restarting MariaDB, mysqlcheck for two tables fails with the same reason:

            db1.questionnaire Warning : InnoDB: Index PRIMARY is marked as corrupted error : Corrupt
            

            With my test cases above, I aimed to investigate the root cause of this problem.

            The source databases are fine. We have tested numerous backups from various times, and it's always the same two tables that present issues, both in the test and production databases, with data differing between them.

            Side note: You can create a complete dump of the restored database without any issue. After restarting you have no chance due the corrupted indexes.

            wursterje Jens Wurster added a comment - - edited Our primary issue is that the restoration of our partial backups, created with mariabackup, fails. The restoration process briefly: /usr/bin/mariabackup --prepare --target-dir $RESTORE_TMP_PATH --incremental-dir $RESTORE_TMP_PATH/$INCREMENTAL_DIR/ Creating a fresh database with a schema exported from mysqldump. Discarding tablespace for tables. Moving .ibd files from the restore temporary path to the database directory. Importing tablespace. Performing a row count for verification: questionnaire 167446 Doing a mysqlcheck for verification: db1.questionnaire OK Everything seems fine, but after restarting MariaDB, mysqlcheck for two tables fails with the same reason: db1.questionnaire Warning : InnoDB: Index PRIMARY is marked as corrupted error : Corrupt With my test cases above, I aimed to investigate the root cause of this problem. The source databases are fine. We have tested numerous backups from various times, and it's always the same two tables that present issues, both in the test and production databases, with data differing between them. Side note: You can create a complete dump of the restored database without any issue. After restarting you have no chance due the corrupted indexes.

            bluebike, thank you for stepping in. I should have remembered MDEV-15225, which was fixed by MDEV-26137 (MariaDB Server 11.2.1) by making it possible to import tables based on an existing .frm file. That is, the CREATE TABLE and ALTER TABLE…DISCARD TABLESPACE steps would be optional, and ALTER TABLE…IMPORT TABLESPACE can work based on a .frm file that you copy to the data directory.

            When using the CREATE TABLESPACE workflow, you have to set mysql56_temporal_format in the same way as it was when the table is originally created. If I remember correctly, SHOW CREATE TABLE will not in any way distinguish the actual column type. You may even have date or time columns in different formats if ALTER TABLE…ADD COLUMN was executed using different values of mysql56_temporal_format.

            I would hope that the inconsistent column type is caught when you also copy the .cfg file. Is that the case?

            wursterje, thank you for the stacktrace.txt. The SIGFPE is triggered here:

            mariadb-10.6.15

            #4  0x00005643929f34f3 in dict_stats_index_set_n_diff (index_stats=@0x7f3a3c567850: {stats = std::vector of length 1, capacity 1 = {{n_diff_key_vals = 0, n_sample_sizes = 1, n_non_null_key_vals = 0}}, index_size = 804, n_leaf_pages = 725}, n_diff_data=<optimized out>) at ./storage/innobase/dict/dict0stats.cc:2651
                    data = 0x7f39d4150df8
                    n_ordinary_leaf_pages = <optimized out>
                    n_prefix = <optimized out>
            #5  dict_stats_analyze_index (index=<optimized out>) at ./storage/innobase/dict/dict0stats.cc:2979
            

            It would seem to be a division by 0 (data->n_recs_on_level).

            Even if we could claim that the rest is not a bug but the expected result of ‘misuse’ of a badly designed interface, this crash is something that we can fix.

            marko Marko Mäkelä added a comment - bluebike , thank you for stepping in. I should have remembered MDEV-15225 , which was fixed by MDEV-26137 (MariaDB Server 11.2.1) by making it possible to import tables based on an existing .frm file. That is, the CREATE TABLE and ALTER TABLE…DISCARD TABLESPACE steps would be optional, and ALTER TABLE…IMPORT TABLESPACE can work based on a .frm file that you copy to the data directory. When using the CREATE TABLESPACE workflow, you have to set mysql56_temporal_format in the same way as it was when the table is originally created. If I remember correctly, SHOW CREATE TABLE will not in any way distinguish the actual column type. You may even have date or time columns in different formats if ALTER TABLE…ADD COLUMN was executed using different values of mysql56_temporal_format . I would hope that the inconsistent column type is caught when you also copy the .cfg file. Is that the case? wursterje , thank you for the stacktrace.txt . The SIGFPE is triggered here: mariadb-10.6.15 #4 0x00005643929f34f3 in dict_stats_index_set_n_diff (index_stats=@0x7f3a3c567850: {stats = std::vector of length 1, capacity 1 = {{n_diff_key_vals = 0, n_sample_sizes = 1, n_non_null_key_vals = 0}}, index_size = 804, n_leaf_pages = 725}, n_diff_data=<optimized out>) at ./storage/innobase/dict/dict0stats.cc:2651 data = 0x7f39d4150df8 n_ordinary_leaf_pages = <optimized out> n_prefix = <optimized out> #5 dict_stats_analyze_index (index=<optimized out>) at ./storage/innobase/dict/dict0stats.cc:2979 It would seem to be a division by 0 ( data->n_recs_on_level ). Even if we could claim that the rest is not a bug but the expected result of ‘misuse’ of a badly designed interface, this crash is something that we can fix.
            marko Marko Mäkelä made changes -
            Status Needs Feedback [ 10501 ] Open [ 1 ]
            wursterje Jens Wurster added a comment - - edited

            Just for my understanding: If a different value for mysql56_temporal_format is the reason, than I'd expect that every table with a datetime column gets corrupted, right? I ask this because we have tables with datetime columns where everything is fine.

            On both systems (server and recovery test) mysql56_temporal_format is set to ON. And both systems are fresh MariaDB 10.6 instances. Data was imported via dumps so there is no underlying upgrade history.

            Here are the table definitions from the affecting columns (for internal reasons I obfuscated the real column names):

            CREATE TABLE `questionnaire` (
              `id` varchar(64) NOT NULL,
              `column2` varchar(64) DEFAULT NULL,
              `column3` varchar(64) DEFAULT NULL,
              `column4` varchar(64) DEFAULT NULL,
              `column5` tinyint(1) unsigned DEFAULT NULL,
              `column6` tinyint(1) unsigned DEFAULT NULL,
              `column7` varchar(250) DEFAULT NULL,
              `column8` text DEFAULT NULL,
              `column9` text DEFAULT NULL,
              `column10` text DEFAULT NULL,
              `column11` text DEFAULT NULL,
              `column12` text DEFAULT NULL,
              `column13` text DEFAULT NULL,
              `column14` varchar(50) DEFAULT NULL,
              `column15` datetime DEFAULT NULL,
              `column16` varchar(50) DEFAULT NULL,
              `column17` char(1) DEFAULT NULL,
              `column18` varchar(50) DEFAULT NULL,
              `column19` varchar(50) DEFAULT NULL,
              `column20` varchar(50) DEFAULT NULL,
              `column21` varchar(50) DEFAULT NULL,
              `column22` varchar(300) DEFAULT NULL,
              `column23` varchar(300) DEFAULT NULL,
              `column24` varchar(300) DEFAULT NULL,
              `column25` varchar(300) DEFAULT NULL,
              `column26` varchar(300) DEFAULT NULL,
              `column27` varchar(300) DEFAULT NULL,
              `column28` varchar(300) DEFAULT NULL,
              `column29` varchar(300) DEFAULT NULL,
              `column30` varchar(300) DEFAULT NULL,
              `column31` varchar(500) DEFAULT NULL,
              `column32` varchar(500) DEFAULT NULL,
              `column33` varchar(500) DEFAULT NULL,
              `column34` varchar(500) DEFAULT NULL,
              `column35` varchar(500) DEFAULT NULL,
              `column36` varchar(500) DEFAULT NULL,
              `column37` varchar(500) DEFAULT NULL,
              `column38` varchar(500) DEFAULT NULL,
              `column39` varchar(500) DEFAULT NULL,
              `column40` varchar(300) DEFAULT NULL,
              `column41` varchar(500) DEFAULT NULL,
              `column42` varchar(300) DEFAULT NULL,
              `column43` int(11) unsigned DEFAULT NULL,
              `column44` tinyint(1) unsigned NOT NULL DEFAULT 0,
              `column45` int(11) unsigned NOT NULL DEFAULT 0,
              `column46` longblob DEFAULT NULL,
              `column47` int(11) unsigned NOT NULL DEFAULT 0,
              `column48` datetime DEFAULT NULL,
              `column49` datetime DEFAULT NULL,
              `column50` tinyint(1) unsigned NOT NULL DEFAULT 0,
              PRIMARY KEY (`id`)
            ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
             
             
            CREATE TABLE `survey` (
              `id` varchar(64) NOT NULL,
              `column2` varchar(64) DEFAULT NULL,
              `column3` varchar(64) DEFAULT NULL,
              `column4` varchar(64) DEFAULT NULL,
              `column5` varchar(250) DEFAULT NULL,
              `column6` datetime DEFAULT NULL,
              `column7` datetime DEFAULT NULL,
              `column8` char(1) DEFAULT NULL,
              `column9` varchar(10) DEFAULT NULL,
              `column10` varchar(50) DEFAULT NULL,
              `column11` int(11) unsigned DEFAULT NULL,
              `column12` int(11) unsigned DEFAULT NULL,
              `column13` int(11) unsigned DEFAULT NULL,
              `column14` int(11) unsigned NOT NULL DEFAULT 0,
              `column15` int(11) unsigned NOT NULL DEFAULT 0,
              `column16` int(11) unsigned NOT NULL DEFAULT 0,
              `column17` int(11) unsigned NOT NULL DEFAULT 0,
              `column18` int(11) unsigned NOT NULL DEFAULT 0,
              `column19` int(11) unsigned NOT NULL DEFAULT 0,
              `column20` int(11) unsigned NOT NULL DEFAULT 0,
              `column21` int(11) unsigned NOT NULL DEFAULT 0,
              `column22` int(11) unsigned NOT NULL DEFAULT 0,
              `column23` int(11) unsigned NOT NULL DEFAULT 0,
              `column24` tinyint(1) unsigned NOT NULL DEFAULT 0,
              `column25` int(11) unsigned DEFAULT NULL,
              `column26` int(11) unsigned NOT NULL DEFAULT 0,
              `column27` tinyint(1) unsigned NOT NULL DEFAULT 0,
              `column28` tinyint(1) unsigned NOT NULL DEFAULT 0,
              `column29` datetime DEFAULT NULL,
              `column30` datetime DEFAULT NULL,
              `column31` tinyint(1) unsigned NOT NULL DEFAULT 0,
              PRIMARY KEY (`id`)
            ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
            

            And I'm still wondering why the PRIMARY Index gets corrupted after restarting MariaDB.

            wursterje Jens Wurster added a comment - - edited Just for my understanding: If a different value for mysql56_temporal_format is the reason, than I'd expect that every table with a datetime column gets corrupted, right? I ask this because we have tables with datetime columns where everything is fine. On both systems (server and recovery test) mysql56_temporal_format is set to ON. And both systems are fresh MariaDB 10.6 instances. Data was imported via dumps so there is no underlying upgrade history. Here are the table definitions from the affecting columns (for internal reasons I obfuscated the real column names): CREATE TABLE `questionnaire` ( `id` varchar(64) NOT NULL, `column2` varchar(64) DEFAULT NULL, `column3` varchar(64) DEFAULT NULL, `column4` varchar(64) DEFAULT NULL, `column5` tinyint(1) unsigned DEFAULT NULL, `column6` tinyint(1) unsigned DEFAULT NULL, `column7` varchar(250) DEFAULT NULL, `column8` text DEFAULT NULL, `column9` text DEFAULT NULL, `column10` text DEFAULT NULL, `column11` text DEFAULT NULL, `column12` text DEFAULT NULL, `column13` text DEFAULT NULL, `column14` varchar(50) DEFAULT NULL, `column15` datetime DEFAULT NULL, `column16` varchar(50) DEFAULT NULL, `column17` char(1) DEFAULT NULL, `column18` varchar(50) DEFAULT NULL, `column19` varchar(50) DEFAULT NULL, `column20` varchar(50) DEFAULT NULL, `column21` varchar(50) DEFAULT NULL, `column22` varchar(300) DEFAULT NULL, `column23` varchar(300) DEFAULT NULL, `column24` varchar(300) DEFAULT NULL, `column25` varchar(300) DEFAULT NULL, `column26` varchar(300) DEFAULT NULL, `column27` varchar(300) DEFAULT NULL, `column28` varchar(300) DEFAULT NULL, `column29` varchar(300) DEFAULT NULL, `column30` varchar(300) DEFAULT NULL, `column31` varchar(500) DEFAULT NULL, `column32` varchar(500) DEFAULT NULL, `column33` varchar(500) DEFAULT NULL, `column34` varchar(500) DEFAULT NULL, `column35` varchar(500) DEFAULT NULL, `column36` varchar(500) DEFAULT NULL, `column37` varchar(500) DEFAULT NULL, `column38` varchar(500) DEFAULT NULL, `column39` varchar(500) DEFAULT NULL, `column40` varchar(300) DEFAULT NULL, `column41` varchar(500) DEFAULT NULL, `column42` varchar(300) DEFAULT NULL, `column43` int(11) unsigned DEFAULT NULL, `column44` tinyint(1) unsigned NOT NULL DEFAULT 0, `column45` int(11) unsigned NOT NULL DEFAULT 0, `column46` longblob DEFAULT NULL, `column47` int(11) unsigned NOT NULL DEFAULT 0, `column48` datetime DEFAULT NULL, `column49` datetime DEFAULT NULL, `column50` tinyint(1) unsigned NOT NULL DEFAULT 0, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;     CREATE TABLE `survey` ( `id` varchar(64) NOT NULL, `column2` varchar(64) DEFAULT NULL, `column3` varchar(64) DEFAULT NULL, `column4` varchar(64) DEFAULT NULL, `column5` varchar(250) DEFAULT NULL, `column6` datetime DEFAULT NULL, `column7` datetime DEFAULT NULL, `column8` char(1) DEFAULT NULL, `column9` varchar(10) DEFAULT NULL, `column10` varchar(50) DEFAULT NULL, `column11` int(11) unsigned DEFAULT NULL, `column12` int(11) unsigned DEFAULT NULL, `column13` int(11) unsigned DEFAULT NULL, `column14` int(11) unsigned NOT NULL DEFAULT 0, `column15` int(11) unsigned NOT NULL DEFAULT 0, `column16` int(11) unsigned NOT NULL DEFAULT 0, `column17` int(11) unsigned NOT NULL DEFAULT 0, `column18` int(11) unsigned NOT NULL DEFAULT 0, `column19` int(11) unsigned NOT NULL DEFAULT 0, `column20` int(11) unsigned NOT NULL DEFAULT 0, `column21` int(11) unsigned NOT NULL DEFAULT 0, `column22` int(11) unsigned NOT NULL DEFAULT 0, `column23` int(11) unsigned NOT NULL DEFAULT 0, `column24` tinyint(1) unsigned NOT NULL DEFAULT 0, `column25` int(11) unsigned DEFAULT NULL, `column26` int(11) unsigned NOT NULL DEFAULT 0, `column27` tinyint(1) unsigned NOT NULL DEFAULT 0, `column28` tinyint(1) unsigned NOT NULL DEFAULT 0, `column29` datetime DEFAULT NULL, `column30` datetime DEFAULT NULL, `column31` tinyint(1) unsigned NOT NULL DEFAULT 0, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; And I'm still wondering why the PRIMARY Index gets corrupted after restarting MariaDB.
            wursterje Jens Wurster added a comment -

            I've tested the command "FLUSH TABLES db1.* FOR EXPORT;" to retrieve the configuration files. I realized that I was using a schema that was newer than the database, leading to a mismatch between the columns. After resolving this issue, everything is working as expected. My apologies for the confusion.

            Currently, I'm investigating why the MariaDB backup restore is failing and causing PRIMARY index corruptions after restarting MariaDB. After the preparation phase, I am unable to locate the *.cfg files, so I can only copy back the *.ibd files, right?

            wursterje Jens Wurster added a comment - I've tested the command "FLUSH TABLES db1.* FOR EXPORT;" to retrieve the configuration files. I realized that I was using a schema that was newer than the database, leading to a mismatch between the columns. After resolving this issue, everything is working as expected. My apologies for the confusion. Currently, I'm investigating why the MariaDB backup restore is failing and causing PRIMARY index corruptions after restarting MariaDB. After the preparation phase, I am unable to locate the *.cfg files, so I can only copy back the *.ibd files, right?

            wursterje, there is an option mariadb-backup --prepare --export that should be used as part of restoring a partial backup.

            Off the top of my head, I can’t tell what would go wrong if you copied files after executing mariadb-backup --prepare. I think that it should be possible to import the .ibd file, but only if there are no secondary indexes in the table. We added this restriction to fix MDEV-26131. Only if you have .cfg files you can import tables that contain secondary indexes.

            If you are copying .ibd files from a backup on which no mariadb-backup --prepare was executed (so that the changes from ib_logfile0 would be applied), then those files may be severely corrupted.

            marko Marko Mäkelä added a comment - wursterje , there is an option mariadb-backup --prepare --export that should be used as part of restoring a partial backup. Off the top of my head, I can’t tell what would go wrong if you copied files after executing mariadb-backup --prepare . I think that it should be possible to import the .ibd file, but only if there are no secondary indexes in the table. We added this restriction to fix MDEV-26131 . Only if you have .cfg files you can import tables that contain secondary indexes. If you are copying .ibd files from a backup on which no mariadb-backup --prepare was executed (so that the changes from ib_logfile0 would be applied), then those files may be severely corrupted.

            wursterje, did you try mariadb-backup --prepare --export so that you would have .cfg files too? Would the schema validation raise an error in that case?

            marko Marko Mäkelä added a comment - wursterje , did you try mariadb-backup --prepare --export so that you would have .cfg files too? Would the schema validation raise an error in that case?
            wursterje Jens Wurster made changes -
            Attachment mariadb-restore.log [ 73204 ]
            wursterje Jens Wurster added a comment -

            @marko The --export option is very useful and makes the restore process a lot easier. Sadly our main problem is still there:

            Before restart:

            db1_prod.questionnaire               OK
            

            After restart:

            db1_prod.questionnaire
            Warning  : InnoDB: Index PRIMARY is marked as corrupted
            Warning  : InnoDB: Index questionnaire_FK is marked as corrupted
            Warning  : InnoDB: Index questionnaire_FK_1 is marked as corrupted
            Warning  : InnoDB: Index questionnaire_FK_2 is marked as corrupted
            error    : Corrupt 
            

            I've attached the complete log of our automatic restore process for this database.

            mariadb-restore.log

            wursterje Jens Wurster added a comment - @marko The --export option is very useful and makes the restore process a lot easier. Sadly our main problem is still there: Before restart: db1_prod.questionnaire OK After restart: db1_prod.questionnaire Warning : InnoDB: Index PRIMARY is marked as corrupted Warning : InnoDB: Index questionnaire_FK is marked as corrupted Warning : InnoDB: Index questionnaire_FK_1 is marked as corrupted Warning : InnoDB: Index questionnaire_FK_2 is marked as corrupted error : Corrupt I've attached the complete log of our automatic restore process for this database. mariadb-restore.log
            wursterje Jens Wurster added a comment - - edited

            I found some more information in the MariaDB error.log:

            2024-02-27 10:47:35 39 [ERROR] InnoDB: Metadata record is missing
            2024-02-27 10:47:35 39 [ERROR] InnoDB: Apparent corruption in space 24 page 9 of index `PRIMARY` of table `db1_prod`.`questionnaire`
            2024-02-27 10:47:35 39 [ERROR] InnoDB: In page 9 of index `PRIMARY` of table `db1_prod`.`questionnaire`
            2024-02-27 10:48:47 39 [ERROR] InnoDB: Metadata record is missing
            2024-02-27 10:48:47 39 [ERROR] InnoDB: Apparent corruption in space 31 page 4094 of index `PRIMARY` of table `db1_prod`.`survey`
            2024-02-27 10:48:47 39 [ERROR] InnoDB: In page 4094 of index `PRIMARY` of table `db1_prod`.`survey`
            2024-02-27 11:18:43 5 [ERROR] InnoDB: Table `db1_prod`.`questionnaire` is missing instant ALTER metadata
            2024-02-27 11:19:49 5 [ERROR] InnoDB: Table `db1_prod`.`survey` is missing instant ALTER metadata
            

            wursterje Jens Wurster added a comment - - edited I found some more information in the MariaDB error.log: 2024-02-27 10:47:35 39 [ERROR] InnoDB: Metadata record is missing 2024-02-27 10:47:35 39 [ERROR] InnoDB: Apparent corruption in space 24 page 9 of index `PRIMARY` of table `db1_prod`.`questionnaire` 2024-02-27 10:47:35 39 [ERROR] InnoDB: In page 9 of index `PRIMARY` of table `db1_prod`.`questionnaire` 2024-02-27 10:48:47 39 [ERROR] InnoDB: Metadata record is missing 2024-02-27 10:48:47 39 [ERROR] InnoDB: Apparent corruption in space 31 page 4094 of index `PRIMARY` of table `db1_prod`.`survey` 2024-02-27 10:48:47 39 [ERROR] InnoDB: In page 4094 of index `PRIMARY` of table `db1_prod`.`survey` 2024-02-27 11:18:43 5 [ERROR] InnoDB: Table `db1_prod`.`questionnaire` is missing instant ALTER metadata 2024-02-27 11:19:49 5 [ERROR] InnoDB: Table `db1_prod`.`survey` is missing instant ALTER metadata

            wursterje, thank you, we are narrowing down the problem. It would be great if you could upload some (as small as possible) files so that we can repeat the steps and then diagnose it in detail. Ideally, you would supply a script where the data is first loaded, then the file exported and imported.

            The Metadata record that the error log mentions is related to MDEV-11369 or MDEV-15562, that is, instant ADD COLUMN or DROP COLUMN or changing the ordering of columns. Exporting and importing such files is supposed to work. The data dictionary will correspond to the latest definition of the table, and inside the data file, at the start of the PRIMARY KEY index (or clustered index) we have a hidden record that identifies the original format of the index. Some records in the clustered index may be in the original format, while others may contain added columns at the end, identified by an additional record header. The metadata record is necessary for being able to interpret other records in the table.

            I quickly tried to see if this bug can be easily reproduced by editing a regression test:

            diff --git a/mysql-test/suite/innodb/t/instant_alter_import.test b/mysql-test/suite/innodb/t/instant_alter_import.test
            index 87a36186150..2a70a1bcf03 100644
            --- a/mysql-test/suite/innodb/t/instant_alter_import.test
            +++ b/mysql-test/suite/innodb/t/instant_alter_import.test
            @@ -61,6 +61,8 @@ unlock tables;
             --echo # The instant ADD COLUMN has to be removed from the metadata.
             alter table t1 import tablespace;
             select * from t1;
            +--source include/restart_mysqld.inc
            +select * from t1;
             
             --echo # Remove metadata for instant DROP COLUMN, then import
             alter table t1 drop x, add column x int first, algorithm instant;
            

            Unfortunately, it is not that simple: the test will return the same result also after the additional restart.

            marko Marko Mäkelä added a comment - wursterje , thank you, we are narrowing down the problem. It would be great if you could upload some (as small as possible) files so that we can repeat the steps and then diagnose it in detail. Ideally, you would supply a script where the data is first loaded, then the file exported and imported. The Metadata record that the error log mentions is related to MDEV-11369 or MDEV-15562 , that is, instant ADD COLUMN or DROP COLUMN or changing the ordering of columns. Exporting and importing such files is supposed to work. The data dictionary will correspond to the latest definition of the table, and inside the data file, at the start of the PRIMARY KEY index (or clustered index) we have a hidden record that identifies the original format of the index. Some records in the clustered index may be in the original format, while others may contain added columns at the end, identified by an additional record header. The metadata record is necessary for being able to interpret other records in the table. I quickly tried to see if this bug can be easily reproduced by editing a regression test: diff --git a/mysql-test/suite/innodb/t/instant_alter_import.test b/mysql-test/suite/innodb/t/instant_alter_import.test index 87a36186150..2a70a1bcf03 100644 --- a/mysql-test/suite/innodb/t/instant_alter_import.test +++ b/mysql-test/suite/innodb/t/instant_alter_import.test @@ -61,6 +61,8 @@ unlock tables; --echo # The instant ADD COLUMN has to be removed from the metadata. alter table t1 import tablespace; select * from t1; +--source include/restart_mysqld.inc +select * from t1; --echo # Remove metadata for instant DROP COLUMN, then import alter table t1 drop x, add column x int first, algorithm instant; Unfortunately, it is not that simple: the test will return the same result also after the additional restart.
            marko Marko Mäkelä made changes -
            Status Open [ 1 ] Needs Feedback [ 10501 ]
            wursterje Jens Wurster added a comment -

            The schema was fresh created last year, only two alter statements where applied after that. But the tables where the alter statements where applied are the problematic ones, at least in the production not in the testing database. The statement looked like:

            ALTER TABLE survey ADD archived TINYINT(1) UNSIGNED DEFAULT 0 NOT NULL;
            ALTER TABLE survey CHANGE archived archived TINYINT(1) UNSIGNED DEFAULT 0 NOT NULL AFTER columnx;
            

            Not sure if this messed up something internally.

            Unfortunately, I'm unsure which files I should provide to you. The backup of these tables are quite big. I could run a customized MariaDB server with some debugging outputs during the restore process of the backups?

            wursterje Jens Wurster added a comment - The schema was fresh created last year, only two alter statements where applied after that. But the tables where the alter statements where applied are the problematic ones, at least in the production not in the testing database. The statement looked like: ALTER TABLE survey ADD archived TINYINT(1) UNSIGNED DEFAULT 0 NOT NULL; ALTER TABLE survey CHANGE archived archived TINYINT(1) UNSIGNED DEFAULT 0 NOT NULL AFTER columnx; Not sure if this messed up something internally. Unfortunately, I'm unsure which files I should provide to you. The backup of these tables are quite big. I could run a customized MariaDB server with some debugging outputs during the restore process of the backups?

            wursterje, I would need the .frm, .cfg and .ibd files so that I could execute the problematic import myself and debug it in detail.

            marko Marko Mäkelä added a comment - wursterje , I would need the .frm , .cfg and .ibd files so that I could execute the problematic import myself and debug it in detail.
            wursterje Jens Wurster added a comment -

            I assume you're referring only to the problematic tables, correct? I can provide a download (approximately 2 GB) for you and send the link to your email address. I just need to speak with our customer and obtain permission.

            wursterje Jens Wurster added a comment - I assume you're referring only to the problematic tables, correct? I can provide a download (approximately 2 GB) for you and send the link to your email address. I just need to speak with our customer and obtain permission.

            We are trying to track down repeated index corruption in 10.11.5 (and 10.11.6). This seems like the closest bug report I have been able to find. We are seeing this in both our testing environment and in our production environment.

            Do we think this is still likely in 10.11.x?

            If so, what would be useful for us to provide?

            douglasawh Doug Whitfield added a comment - We are trying to track down repeated index corruption in 10.11.5 (and 10.11.6). This seems like the closest bug report I have been able to find. We are seeing this in both our testing environment and in our production environment. Do we think this is still likely in 10.11.x? If so, what would be useful for us to provide?

            Sorry, this is actually waiting for me to test with the data files that wursterje provided. I downloaded them some weeks ago but did not have time to check them yet. I will try to do that soon, now that I am done with some more urgent work.

            marko Marko Mäkelä added a comment - Sorry, this is actually waiting for me to test with the data files that wursterje provided. I downloaded them some weeks ago but did not have time to check them yet. I will try to do that soon, now that I am done with some more urgent work.
            marko Marko Mäkelä made changes -
            Status Needs Feedback [ 10501 ] Open [ 1 ]
            marko Marko Mäkelä made changes -
            Fix Version/s 10.6 [ 24028 ]
            marko Marko Mäkelä made changes -
            Status Open [ 1 ] In Progress [ 3 ]

            Good news: I can reproduce this easily with the files that wursterje provided. I used the 11.2 version so that I have a simpler MDEV-26137 workflow, simply moving the files questionnaire.* to the data directory and executing

            ALTER TABLE questionnaire IMPORT TABLESPACE;
            CHECK TABLE questionnaire EXTENDED;
            

            This did not report any errors. After I restarted the server and executed the CHECK TABLE again, I got the following error:

            11.2 b620b3949a0e021774058adf58250fa25471bbc4

            2024-04-09 16:22:46 3 [ERROR] InnoDB: Table `test`.`questionnaire` is missing instant ALTER metadata
            mariadbd: /mariadb/11/storage/innobase/dict/dict0load.cc:2529: dict_table_t* dict_load_table_one(const st_::span<const char>&, dict_err_ignore_t, dict_names_t&): Assertion `!table || (ignore_err & ~DICT_ERR_IGNORE_FK_NOKEY) || !table->is_readable() || !table->corrupted' failed.
            

            The table->corrupted had been set here:

            11.2 b620b3949a0e021774058adf58250fa25471bbc4

            #0  0x000055664c9154b0 in btr_cur_instant_init_low (index=index@entry=0x7fbc3004a040, mtr=mtr@entry=0x7fbff3dfc738) at /mariadb/11/storage/innobase/btr/btr0cur.cc:255
            #1  0x000055664c915c74 in btr_cur_instant_init (table=0x7fbc300379e0) at /mariadb/11/storage/innobase/btr/btr0cur.cc:463
            #2  0x000055664c94721c in dict_load_table_one (name=@0x7fbff3dfd250: {data_ = 0x7fbff3dfda10 "test/questionnaire", size_ = 18}, ignore_err=ignore_err@entry=DICT_ERR_IGNORE_FK_NOKEY, fk_tables=std::deque with 0 elements) at /mariadb/11/storage/innobase/dict/dict0load.cc:2493
            #3  0x000055664c9475e9 in dict_sys_t::load_table (this=this@entry=0x55664cd81140 <dict_sys>, name=@0x7fbff3dfd250: {data_ = 0x7fbff3dfda10 "test/questionnaire", size_ = 18}, ignore=ignore@entry=DICT_ERR_IGNORE_FK_NOKEY) at /mariadb/11/storage/innobase/dict/dict0load.cc:2563
            #4  0x000055664c8970ca in dict_table_open_on_name (table_name=table_name@entry=0x7fbff3dfda10 "test/questionnaire", dict_locked=dict_locked@entry=false, ignore_err=ignore_err@entry=DICT_ERR_IGNORE_FK_NOKEY) at /mariadb/11/storage/innobase/dict/dict0dict.cc:1065
            #5  0x000055664c85eab4 in ha_innobase::open_dict_table (norm_name=norm_name@entry=0x7fbff3dfda10 "test/questionnaire", is_partition=is_partition@entry=false, ignore_err=ignore_err@entry=DICT_ERR_IGNORE_FK_NOKEY) at /mariadb/11/storage/innobase/handler/ha_innodb.cc:6162
            #6  0x000055664c873422 in ha_innobase::open (this=0x7fbc30033160, name=0x7fbc3003a158 "./test/questionnaire") at /mariadb/11/storage/innobase/handler/ha_innodb.cc:5867
            

            marko Marko Mäkelä added a comment - Good news: I can reproduce this easily with the files that wursterje provided. I used the 11.2 version so that I have a simpler MDEV-26137 workflow, simply moving the files questionnaire.* to the data directory and executing ALTER TABLE questionnaire IMPORT TABLESPACE; CHECK TABLE questionnaire EXTENDED; This did not report any errors. After I restarted the server and executed the CHECK TABLE again, I got the following error: 11.2 b620b3949a0e021774058adf58250fa25471bbc4 2024-04-09 16:22:46 3 [ERROR] InnoDB: Table `test`.`questionnaire` is missing instant ALTER metadata mariadbd: /mariadb/11/storage/innobase/dict/dict0load.cc:2529: dict_table_t* dict_load_table_one(const st_::span<const char>&, dict_err_ignore_t, dict_names_t&): Assertion `!table || (ignore_err & ~DICT_ERR_IGNORE_FK_NOKEY) || !table->is_readable() || !table->corrupted' failed. The table->corrupted had been set here: 11.2 b620b3949a0e021774058adf58250fa25471bbc4 #0 0x000055664c9154b0 in btr_cur_instant_init_low (index=index@entry=0x7fbc3004a040, mtr=mtr@entry=0x7fbff3dfc738) at /mariadb/11/storage/innobase/btr/btr0cur.cc:255 #1 0x000055664c915c74 in btr_cur_instant_init (table=0x7fbc300379e0) at /mariadb/11/storage/innobase/btr/btr0cur.cc:463 #2 0x000055664c94721c in dict_load_table_one (name=@0x7fbff3dfd250: {data_ = 0x7fbff3dfda10 "test/questionnaire", size_ = 18}, ignore_err=ignore_err@entry=DICT_ERR_IGNORE_FK_NOKEY, fk_tables=std::deque with 0 elements) at /mariadb/11/storage/innobase/dict/dict0load.cc:2493 #3 0x000055664c9475e9 in dict_sys_t::load_table (this=this@entry=0x55664cd81140 <dict_sys>, name=@0x7fbff3dfd250: {data_ = 0x7fbff3dfda10 "test/questionnaire", size_ = 18}, ignore=ignore@entry=DICT_ERR_IGNORE_FK_NOKEY) at /mariadb/11/storage/innobase/dict/dict0load.cc:2563 #4 0x000055664c8970ca in dict_table_open_on_name (table_name=table_name@entry=0x7fbff3dfda10 "test/questionnaire", dict_locked=dict_locked@entry=false, ignore_err=ignore_err@entry=DICT_ERR_IGNORE_FK_NOKEY) at /mariadb/11/storage/innobase/dict/dict0dict.cc:1065 #5 0x000055664c85eab4 in ha_innobase::open_dict_table (norm_name=norm_name@entry=0x7fbff3dfda10 "test/questionnaire", is_partition=is_partition@entry=false, ignore_err=ignore_err@entry=DICT_ERR_IGNORE_FK_NOKEY) at /mariadb/11/storage/innobase/handler/ha_innodb.cc:6162 #6 0x000055664c873422 in ha_innobase::open (this=0x7fbc30033160, name=0x7fbc3003a158 "./test/questionnaire") at /mariadb/11/storage/innobase/handler/ha_innodb.cc:5867

            I see that at the time of the crash, page 9 seems to be the leftmost leaf page of the clustered index. The first record payload starts at byte offset 0xc5. This looks like a normal user record, not the hidden metadata record that should describe the instantly added columns. I checked the difference of the page 9 image before and after the IMPORT TABLESPACE, and it includes the following:

            -000060 02 00 22 69 6e 66 69 6d 75 6d 00 03 00 0b 00 00
            +000060 02 00 62 69 6e 66 69 6d 75 6d 00 02 00 0b 00 00
             000070 73 75 70 72 65 6d 75 6d 00 7f ff ff ff ff ff 01
            -000080 30 00 14 00 40 00 00 00 00 00 00 80 00 00 00 00
            -000090 00 00 00 00 06 d6 00 02 8e b8 00 00 00 26 00 00
            -0000a0 00 00 00 00 00 6a 00 00 00 00 00 00 00 00 00 00
            +000080 30 00 14 00 00 00 00 00 00 00 00 00 00 00 00 00
            +000090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
            +*
             0000b0 5b 9b 01 01 00 04 18 24 20 24 07 ff ff fd 8f 9a
             0000c0 00 00 18 ff ab 30 30 30 30 31 35 33 38 2d 64 64
            

            The successor of the infimum pseudo-record used to point to 0x85 and not 0xc5. At 0x80 we can see the MDEV-15562 metadata record marker. It looks like the IMPORT TABLESPACE code wrongly removed this record. I will debug this in more detail tomorrow, covering the IMPORT execution in rr record (https://rr-project.org/).

            marko Marko Mäkelä added a comment - I see that at the time of the crash, page 9 seems to be the leftmost leaf page of the clustered index. The first record payload starts at byte offset 0xc5. This looks like a normal user record, not the hidden metadata record that should describe the instantly added columns. I checked the difference of the page 9 image before and after the IMPORT TABLESPACE , and it includes the following: -000060 02 00 22 69 6e 66 69 6d 75 6d 00 03 00 0b 00 00 +000060 02 00 62 69 6e 66 69 6d 75 6d 00 02 00 0b 00 00 000070 73 75 70 72 65 6d 75 6d 00 7f ff ff ff ff ff 01 -000080 30 00 14 00 40 00 00 00 00 00 00 80 00 00 00 00 -000090 00 00 00 00 06 d6 00 02 8e b8 00 00 00 26 00 00 -0000a0 00 00 00 00 00 6a 00 00 00 00 00 00 00 00 00 00 +000080 30 00 14 00 00 00 00 00 00 00 00 00 00 00 00 00 +000090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* 0000b0 5b 9b 01 01 00 04 18 24 20 24 07 ff ff fd 8f 9a 0000c0 00 00 18 ff ab 30 30 30 30 31 35 33 38 2d 64 64 The successor of the infimum pseudo-record used to point to 0x85 and not 0xc5. At 0x80 we can see the MDEV-15562 metadata record marker. It looks like the IMPORT TABLESPACE code wrongly removed this record. I will debug this in more detail tomorrow, covering the IMPORT execution in rr record ( https://rr-project.org/ ).

            The fix of MDEV-18543 was incomplete. I can reproduce this with the following change to an existing test:

            diff --git a/mysql-test/suite/innodb/t/instant_alter_import.test b/mysql-test/suite/innodb/t/instant_alter_import.test
            index 7bd5645436c..50eda83f4b0 100644
            --- a/mysql-test/suite/innodb/t/instant_alter_import.test
            +++ b/mysql-test/suite/innodb/t/instant_alter_import.test
            @@ -79,6 +79,7 @@ flush tables t2 for export;
             unlock tables;
             
             alter table t1 import tablespace;
            +--source include/restart_mysqld.inc
             select * from t1;
             
             drop table t2;
            

            10.4 662bb176b412993a085fe329af559ddc3dc83ec3 with the above change

            CURRENT_TEST: innodb.instant_alter_import
            mysqltest: At line 83: query 'select * from t1' failed: 2013: Lost connection to MySQL server during query
            …
            mysqld: /mariadb/10.4/storage/innobase/include/dict0mem.h:2373: bool dict_index_t::is_instant() const: Assertion `n_core_fields <= n_fields || table->n_dropped()' failed.
            

            I filed https://github.com/MariaDB/server/pull/3190 for the fix.

            marko Marko Mäkelä added a comment - The fix of MDEV-18543 was incomplete. I can reproduce this with the following change to an existing test: diff --git a/mysql-test/suite/innodb/t/instant_alter_import.test b/mysql-test/suite/innodb/t/instant_alter_import.test index 7bd5645436c..50eda83f4b0 100644 --- a/mysql-test/suite/innodb/t/instant_alter_import.test +++ b/mysql-test/suite/innodb/t/instant_alter_import.test @@ -79,6 +79,7 @@ flush tables t2 for export; unlock tables; alter table t1 import tablespace; +--source include/restart_mysqld.inc select * from t1; drop table t2; 10.4 662bb176b412993a085fe329af559ddc3dc83ec3 with the above change CURRENT_TEST: innodb.instant_alter_import mysqltest: At line 83: query 'select * from t1' failed: 2013: Lost connection to MySQL server during query … mysqld: /mariadb/10.4/storage/innobase/include/dict0mem.h:2373: bool dict_index_t::is_instant() const: Assertion `n_core_fields <= n_fields || table->n_dropped()' failed. I filed https://github.com/MariaDB/server/pull/3190 for the fix.
            marko Marko Mäkelä made changes -
            marko Marko Mäkelä made changes -
            Component/s Data Definition - Alter Table [ 10114 ]
            Component/s Storage Engine - InnoDB [ 10129 ]
            Fix Version/s 10.4 [ 22408 ]
            Fix Version/s 10.5 [ 23123 ]
            Fix Version/s 10.11 [ 27614 ]
            Fix Version/s 11.0 [ 28320 ]
            Fix Version/s 11.1 [ 28549 ]
            Fix Version/s 11.2 [ 28603 ]
            Fix Version/s 11.4 [ 29301 ]
            Affects Version/s 10.4 [ 22408 ]
            Affects Version/s 10.5 [ 23123 ]
            Affects Version/s 10.6 [ 24028 ]
            Affects Version/s 10.7 [ 24805 ]
            Affects Version/s 10.8 [ 26121 ]
            Affects Version/s 10.9 [ 26905 ]
            Affects Version/s 10.10 [ 27530 ]
            Affects Version/s 10.11 [ 27614 ]
            Affects Version/s 11.0 [ 28320 ]
            Affects Version/s 11.1 [ 28549 ]
            Affects Version/s 11.2 [ 28603 ]
            Affects Version/s 11.3 [ 28565 ]
            Affects Version/s 11.4 [ 29301 ]
            Labels regression
            marko Marko Mäkelä made changes -
            Assignee Marko Mäkelä [ marko ] Thirunarayanan Balathandayuthapani [ thiru ]
            Status In Progress [ 3 ] In Review [ 10002 ]
            thiru Thirunarayanan Balathandayuthapani made changes -
            Assignee Thirunarayanan Balathandayuthapani [ thiru ] Marko Mäkelä [ marko ]
            Status In Review [ 10002 ] Stalled [ 10000 ]

            thanks for approving the changes on github. What does the "Stalled" status here mean?

            douglasawh Doug Whitfield added a comment - thanks for approving the changes on github. What does the "Stalled" status here mean?

            The "stalled" ticket state in this system can mean almost anything. The states do not even distinguish between "review approved" and "review rejected". In this case, we thought that the fix can be applied without subjecting it to additional stress testing.

            marko Marko Mäkelä added a comment - The "stalled" ticket state in this system can mean almost anything. The states do not even distinguish between "review approved" and "review rejected". In this case, we thought that the fix can be applied without subjecting it to additional stress testing.
            marko Marko Mäkelä made changes -
            issue.field.resolutiondate 2024-04-11 06:27:03.0 2024-04-11 06:27:03.339
            marko Marko Mäkelä made changes -
            Fix Version/s 10.4.34 [ 29625 ]
            Fix Version/s 10.5.25 [ 29626 ]
            Fix Version/s 10.6.18 [ 29627 ]
            Fix Version/s 10.11.8 [ 29630 ]
            Fix Version/s 11.0.6 [ 29628 ]
            Fix Version/s 11.1.5 [ 29629 ]
            Fix Version/s 11.2.4 [ 29631 ]
            Fix Version/s 11.4.2 [ 29633 ]
            Fix Version/s 10.4 [ 22408 ]
            Fix Version/s 10.5 [ 23123 ]
            Fix Version/s 10.6 [ 24028 ]
            Fix Version/s 10.11 [ 27614 ]
            Fix Version/s 11.0 [ 28320 ]
            Fix Version/s 11.1 [ 28549 ]
            Fix Version/s 11.2 [ 28603 ]
            Fix Version/s 11.4 [ 29301 ]
            Resolution Fixed [ 1 ]
            Status Stalled [ 10000 ] Closed [ 6 ]
            wursterje Jens Wurster added a comment - - edited

            Thanks @Marko.

            Will there also be a fix for our affecting version 10.6. (our main problem exists on that version)?

            wursterje Jens Wurster added a comment - - edited Thanks @Marko. Will there also be a fix for our affecting version 10.6. (our main problem exists on that version)?

            Yes, the 10.4 branch will be merged to all other branches before the upcoming maintenance releases, which should be out in a couple of weeks.

            marko Marko Mäkelä added a comment - Yes, the 10.4 branch will be merged to all other branches before the upcoming maintenance releases, which should be out in a couple of weeks.

            People

              marko Marko Mäkelä
              wursterje Jens Wurster
              Votes:
              0 Vote for this issue
              Watchers:
              5 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.