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

InnoDB: Corruption of an index tree

    XMLWordPrintable

Details

    Description

      Recently we had mariadb (10.4.22) crash in a loop. The cause seems to be an index corruption. We exported the binlogs for this specific DB, and were able to consistently reproduce (tho cannot share the binlogs because of sensitive data) but were unable to produce a small test case.

      Database in corrupted state, but before crash:

      MariaDB [test]> select option_id,hex(option_name) from wp_options where option_id in(19269,74606) order by option_name asc\G
      *************************** 1. row ***************************
             option_id: 19269
      hex(option_name): 77705F696E7374616C6C65725F73657474696E6773
      *************************** 2. row ***************************
             option_id: 74606
      hex(option_name): 77705F696E7374616C6C65725F73657474696E6773
      2 rows in set (0.000 sec)
       
      MariaDB [test]> show create table wp_options\G
      *************************** 1. row ***************************
             Table: wp_options
      Create Table: CREATE TABLE `wp_options` (
        `option_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
        `option_name` varchar(191) NOT NULL DEFAULT '',
        `option_value` longtext NOT NULL,
        `autoload` varchar(20) NOT NULL DEFAULT 'yes',
        PRIMARY KEY (`option_id`),
        UNIQUE KEY `option_name` (`option_name`),
        KEY `autoload` (`autoload`)
      ) ENGINE=InnoDB AUTO_INCREMENT=74609 DEFAULT CHARSET=utf8mb4
      1 row in set (0.000 sec)
      

      Replaying the same binlogs on 10.3.32 or 10.4.18 doesn't corrupt the index. Instead, it stops with a duplicate entry error:

      ERROR 1062 (23000) at line 23811001: Duplicate entry 'wp_installer_settings' for key 'option_name'
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            aidvu Andrija Vucinic
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.