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

Assertion `index->n_core_null_bytes <= (((index->n_nullable) + 7) / 8) || (! leaf && index->n_core_fields != index->n_fields)' failed in rec_init_offsets

    XMLWordPrintable

Details

    Description

      --source include/have_innodb.inc
       
      CREATE TABLE t1 (a INT, b INT NOT NULL DEFAULT 0) ENGINE=InnoDB;
       
      INSERT INTO t1 () VALUES (),(),(),();
      INSERT INTO t1 SELECT * FROM t1;
      INSERT INTO t1 SELECT * FROM t1;
      INSERT INTO t1 SELECT * FROM t1;
      INSERT INTO t1 SELECT * FROM t1;
      INSERT INTO t1 SELECT * FROM t1;
      ALTER TABLE t1 ROW_FORMAT=COMPACT;
      INSERT INTO t1 SELECT * FROM t1;
      ALTER TABLE t1 DROP a;
      ALTER TABLE t1 ADD a SMALLINT NOT NULL;
      INSERT INTO t1 SELECT * FROM t1;
      INSERT INTO t1 SELECT * FROM t1;
       
      --source include/restart_mysqld.inc
       
      DROP TABLE t1;
      

      10.4 625aa232

      mysqld: /data/src/10.4/storage/innobase/rem/rem0rec.cc:621: void rec_init_offsets(const rec_t*, const dict_index_t*, bool, ulint*): Assertion `index->n_core_null_bytes <= (((index->n_nullable) + 7) / 8) || (!leaf && index->n_core_fields != index->n_fields)' failed.
      190323 16:20:31 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007fa15f2e0ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x000055aaf230c8aa in rec_init_offsets (rec=0x7fa158de807e "", index=0x7fa14002a138, leaf=false, offsets=0x7fa1457f7e60) at /data/src/10.4/storage/innobase/rem/rem0rec.cc:620
      #9  0x000055aaf230d889 in rec_get_offsets_func (rec=0x7fa158de807e "", index=0x7fa14002a138, offsets=0x7fa1457f7e60, leaf=false, n_fields=18446744073709551615, file=0x55aaf2a7b608 "/data/src/10.4/storage/innobase/btr/btr0cur.cc", line=2751, heap=0x7fa1457f7760) at /data/src/10.4/storage/innobase/rem/rem0rec.cc:933
      #10 0x000055aaf244f875 in btr_cur_open_at_index_side_func (from_left=true, index=0x7fa14002a138, latch_mode=1, cursor=0x7fa1457f8250, level=0, file=0x55aaf2a7b608 "/data/src/10.4/storage/innobase/btr/btr0cur.cc", line=427, mtr=0x7fa1457f8490) at /data/src/10.4/storage/innobase/btr/btr0cur.cc:2751
      #11 0x000055aaf2448bdd in btr_cur_instant_init_low (index=0x7fa14002a138, mtr=0x7fa1457f8490) at /data/src/10.4/storage/innobase/btr/btr0cur.cc:426
      #12 0x000055aaf24496d6 in btr_cur_instant_init (table=0x7fa140028b38) at /data/src/10.4/storage/innobase/btr/btr0cur.cc:617
      #13 0x000055aaf24f1532 in dict_load_table_one (name=..., cached=true, ignore_err=DICT_ERR_IGNORE_NONE, fk_tables=std::deque with 0 elements) at /data/src/10.4/storage/innobase/dict/dict0load.cc:3014
      #14 0x000055aaf24f0644 in dict_load_table (name=0x7fa140020818 "test/t1", cached=true, ignore_err=DICT_ERR_IGNORE_NONE) at /data/src/10.4/storage/innobase/dict/dict0load.cc:2766
      #15 0x000055aaf24f1dec in dict_load_table_on_id (table_id=21, ignore_err=DICT_ERR_IGNORE_NONE) at /data/src/10.4/storage/innobase/dict/dict0load.cc:3178
      #16 0x000055aaf24d095e in dict_table_open_on_id_low (table_id=21, ignore_err=DICT_ERR_IGNORE_NONE, cached_only=false) at /data/src/10.4/storage/innobase/dict/dict0dict.cc:424
      #17 0x000055aaf24d202c in dict_table_open_on_id (table_id=21, dict_locked=0, table_op=DICT_TABLE_OP_NORMAL) at /data/src/10.4/storage/innobase/dict/dict0dict.cc:1010
      #18 0x000055aaf237efb7 in row_purge_parse_undo_rec (node=0x55aaf4a820c0, undo_rec=0x7fa1400191f8 "", updated_extern=0x7fa1457f9d1e, thr=0x55aaf4a82008) at /data/src/10.4/storage/innobase/row/row0purge.cc:1064
      #19 0x000055aaf237f9cf in row_purge (node=0x55aaf4a820c0, undo_rec=0x7fa1400191f8 "", thr=0x55aaf4a82008) at /data/src/10.4/storage/innobase/row/row0purge.cc:1251
      #20 0x000055aaf237fb2c in row_purge_step (thr=0x55aaf4a82008) at /data/src/10.4/storage/innobase/row/row0purge.cc:1315
      #21 0x000055aaf23013d4 in que_thr_step (thr=0x55aaf4a82008) at /data/src/10.4/storage/innobase/que/que0que.cc:1042
      #22 0x000055aaf2301607 in que_run_threads_low (thr=0x55aaf4a82008) at /data/src/10.4/storage/innobase/que/que0que.cc:1104
      #23 0x000055aaf23017f8 in que_run_threads (thr=0x55aaf4a82008) at /data/src/10.4/storage/innobase/que/que0que.cc:1144
      #24 0x000055aaf23ea5d9 in trx_purge (n_purge_threads=4, truncate=false) at /data/src/10.4/storage/innobase/trx/trx0purge.cc:1319
      #25 0x000055aaf23bfb25 in srv_do_purge (n_total_purged=0x7fa1457f9ed8) at /data/src/10.4/storage/innobase/srv/srv0srv.cc:2577
      #26 0x000055aaf23bff52 in srv_purge_coordinator_thread (arg=0x0) at /data/src/10.4/storage/innobase/srv/srv0srv.cc:2700
      #27 0x00007fa1611cf494 in start_thread (arg=0x7fa1457fa700) at pthread_create.c:333
      #28 0x00007fa15f39d93f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      Couldn't reproduce on 10.3.

      Attachments

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.