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

Crash during instant ADD COLUMN with long DEFAULT value

    XMLWordPrintable

Details

    Description

      thiru reported a crash with the following instant ADD COLUMN operation that involves splitting the leftmost leaf page and storing a default value off-page:

      create table t1(f1 int, f2 int not null)engine=innodb;
      insert into t1 values(1, 2);
      alter table t1 add column f3 int not null default 4, algorithm=instant;
      alter table t1 add column f4 blob not null default repeat('a', 9999), algorithm=instant;
      check table t1;
      drop table t1;
      

      For the second alter table, an assertion would fail in a debug build:

      10.3 ed49f9aae2ad4f8d89294e91fba6a9ec704ded49

      btr/btr0cur.cc:4679: dberr_t btr_cur_pessimistic_update(ulint, btr_cur_t*, ulint**, mem_heap_t**, mem_heap_t*, big_rec_t**, upd_t*, ulint, que_thr_t*, trx_id_t, mtr_t*): Assertion `flags & BTR_KEEP_POS_FLAG' failed.
      

      In a non-debug build, no assertion fails for this test, and the test passes. Theoretically, it might be possible that the default values stored off-page could be attached to a wrong record.

      Attachments

        Issue Links

          Activity

            People

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