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

Assertion failures upon adding an index

    XMLWordPrintable

Details

    Description

      Possibly related to, or even a duplicate of MDEV-31161, but there is no explicit compression here at least.

      Reproducible, needs cleaning

      perl ./mtr bug.ts1 --mem  --mysqld=--loose-disable-performance-schema  --mysqld=--default-storage-engine=InnoDB
      

      --source include/have_innodb.inc
       
      /* WRK-0 QNO 8 */ CREATE DATABASE IF NOT EXISTS innodb_key_block_size_db;
      /* WRK-0 QNO 13 */ CREATE TABLE `t001` (`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
       `c02` CHAR(3) NOT NULL DEFAULT '',
       `c01` INT ZEROFILL NOT NULL DEFAULT 0,
       `c03` VARCHAR(1024) NOT NULL DEFAULT '',
       UNIQUE idx1 (`c01`,`c02`),
       PRIMARY KEY (`id`)) ENGINE=innodb;
      /* WRK-0 QNO 18 */ CREATE TABLE `t002` (`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
       `c01` INT ZEROFILL NOT NULL DEFAULT 0,
       `c02` CHAR(3) NOT NULL DEFAULT '',
       `c05` LONGBLOB NOT NULL DEFAULT '',
       KEY idx2 (c05(128)),
       UNIQUE idx1 (`c01`,`c02`),
       PRIMARY KEY (`id`)) ENGINE=innodb row_format=dynamic;
      /* WRK-0 QNO 23 */ CREATE TABLE `t003` (`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
       `c02` CHAR(3) NOT NULL DEFAULT '',
       `c05` LONGBLOB NOT NULL DEFAULT '',
       `c01` INT ZEROFILL NOT NULL DEFAULT 0,
       KEY idx2 (c05(128)),
       UNIQUE idx1 (`c01`,`c02`),
       PRIMARY KEY (`id`)) ENGINE=innodb row_format=redundant;
      /* WRK-0 QNO 25 */ USE innodb_key_block_size_db;
      /* WRK-0 QNO 28 */ CREATE TABLE `t004` (`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
       `c02` CHAR(3) NOT NULL DEFAULT '',
       `c06` DOUBLE(16,8) COMMENT 'Percentage',
       `c01` INT ZEROFILL NOT NULL DEFAULT 0,
       `c05` LONGBLOB NOT NULL DEFAULT '',
       KEY idx2 (c05(128)),
       UNIQUE idx1 (`c01`,`c02`),
       PRIMARY KEY (`id`)) ENGINE=innodb row_format=compact;
      /* WRK-0 QNO 33 */ CREATE TABLE `t005` (`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
       `c01` INT ZEROFILL NOT NULL DEFAULT 0,
       `c05` LONGBLOB NOT NULL DEFAULT '',
       `c03` VARCHAR(1024) NOT NULL DEFAULT '',
       `c02` CHAR(3) NOT NULL DEFAULT '',
       /*Indices*/
       KEY idx2 (c05(128)),
       UNIQUE idx1 (`c01`,`c02`),
       PRIMARY KEY (`id`)) ENGINE=innodb;
      /* WRK-0 QNO 38 */ CREATE TABLE `t006` (`c07` DATE,
       `c06` DOUBLE(16,8) COMMENT 'Percentage',
       `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
       `c10` BIGINT COMMENT 'Y',
       `c03` VARCHAR(1024) NOT NULL DEFAULT '',
       PRIMARY KEY (`id`)) ENGINE=innodb key_block_size=1;
      /* WRK-7 QNO 1729 */ INSERT IGNORE INTO `innodb_key_block_size_db`.`t006` (`c10`) VALUE (`c03`);
      /* WRK-4 QNO 8100 */ ALTER TABLE /*!100502 IF EXISTS */ `innodb_key_block_size_db`.`t006` ADD INDEX IF NOT EXISTS (`c06` ASC) COMMENT 'finger', ALGORITHM = NOCOPY, ADD KEY IF NOT EXISTS indcnstr18 (`c03` DESC);
      /* WRK-7 QNO 6853 */ REPAIR LOCAL TABLE `mysql`.`columns_priv`;
      /* WRK-7 QNO 6875 */ CREATE OR REPLACE INDEX indcnstr3 ON `innodb_key_block_size_db`.`t006` (`c07` ASC) NOWAIT COMMENT 'guarantee' ALGORITHM = COPY;
      

      10.6 ef7a2344af2392365333da9ca40ede159e3fc398 debug

      2024-04-29  0:21:03 4 [ERROR] InnoDB: Cannot add field `c03` in table `innodb_key_block_size_db`.`t006` because after adding it, the row size is 1028 which is greater than maximum allowed size (898 bytes) for a record on index leaf page.
      mariadbd: /data/bld/10.6-debug/storage/innobase/handler/handler0alter.cc:9202: bool rollback_inplace_alter_table(Alter_inplace_info*, const TABLE*, row_prebuilt_t*): Assertion `!prebuilt->table->indexes.start->online_log' failed.
      

      10.6 ef7a2344af2392365333da9ca40ede159e3fc398 non-debug

      2024-04-29  0:20:32 0 [ERROR] mariadbd: Failed to release memory pointer 0x7f5a7014ce40, 1 bytes (Errcode: 22 "Invalid argument")
      2024-04-29  0:20:32 0 [ERROR] mariadbd: Error on close of '(null)' (Errcode: 9 "Bad file descriptor")
      2024-04-29 00:20:32 0x7f5a9bcfc800  InnoDB: Assertion failure in file /data/bld/10.6-rel/storage/innobase/row/row0merge.cc line 4212
      InnoDB: Failing assertion: res != -1
      

      Attachments

        Issue Links

          Activity

            People

              elenst Elena Stepanova
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.