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

Insert on delete-marked record can wrongly inherit old values for instantly added column

    XMLWordPrintable

Details

    Description

      The following test attempts to free the value of column b twice, resulting in a debug assertion failure:

      --source include/have_innodb.inc
      SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
      SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
       
      CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE = InnoDB  ;
      INSERT INTO t1 SET a = 1;
      ALTER TABLE t1 ADD COLUMN b TEXT;
      BEGIN;
      UPDATE t1 SET b = REPEAT('1', @@innodb_page_size / 2);
      UPDATE t1 SET a = 2;
      INSERT INTO t1 SET a = 1;
      DELETE FROM t1;
      COMMIT;
      --source include/wait_all_purged.inc
      DROP TABLE t1;
      SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
      

      10.3 7e869a2767c849d266ffbf1def9b93ffae7cd428

      mysqld: /mariadb/10.3/storage/innobase/buf/buf0buf.cc:4948: buf_block_t* buf_page_get_gen(const page_id_t&, const page_size_t&, ulint, buf_block_t*, ulint, const char*, unsigned int, mtr_t*, dberr_t*): Assertion `mode == 16 || mode == 12 || !fix_block->page.file_page_was_freed' failed.
      buf/buf0buf.cc:4953(buf_page_get_gen(page_id_t const&, page_size_t const&, unsigned long, buf_block_t*, unsigned long, char const*, unsigned int, mtr_t*, dberr_t*))[0x55fedca5a27c]
      btr/btr0cur.cc:7848(btr_free_externally_stored_field(dict_index_t*, unsigned char*, unsigned char const*, unsigned long const*, page_zip_des_t*, unsigned long, bool, mtr_t*))[0x55fedca5a7dd]
      btr/btr0cur.cc:7950(btr_rec_free_externally_stored_fields(dict_index_t*, unsigned char*, unsigned long const*, page_zip_des_t*, bool, mtr_t*))[0x55fedca54d2e]
      btr/btr0cur.cc:5651(btr_cur_pessimistic_delete(dberr_t*, unsigned long, btr_cur_t*, unsigned long, bool, mtr_t*))[0x55fedc96fd8a]
      row/row0purge.cc:178(row_purge_remove_clust_if_poss_low(purge_node_t*, unsigned long))[0x55fedc96feb8]
      row/row0purge.cc:223(row_purge_remove_clust_if_poss(purge_node_t*))[0x55fedc971766]
      row/row0purge.cc:806(row_purge_del_mark(purge_node_t*))[0x55fedc972c55]
      row/row0purge.cc:1187(row_purge_record_func(purge_node_t*, unsigned char*, que_thr_t const*, bool))[0x55fedc972f6d]
      

      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.