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

Assertion `dict_index_is_clust(index)' failed in row_ins_index_entry_set_vals

    XMLWordPrintable

Details

    Description

      Note: The problem might be related to (or even be a side-effect of) MDEV-20902, as the test case involves the same flawed structure; but I'm not sure it's the only way to get the same failure, so I'm filing it separately, to be safe.

      Note: Run the test case with --mysqld=--innodb_page_size=4K.

      --source include/have_innodb.inc
       
      CREATE TABLE t1 (
          pk integer,
          f01 char(255) CHARACTER SET utf8,
          f02 char(255) CHARACTER SET ucs2,
          f03 set ('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z') CHARACTER SET ucs2,
          f04 INT,
          f05 varchar(255)  CHARACTER SET ucs2,
          f06 longtext  CHARACTER SET utf8,
          f07 char(255)  CHARACTER SET ucs2,
          f08 longtext  CHARACTER SET utf8,
          f09 varchar(255)  CHARACTER SET ucs2,
          f10 longtext  CHARACTER SET ucs2,
          f11 set ('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z') CHARACTER SET ucs2,
          f12 char(255)  CHARACTER SET utf8,
          PRIMARY KEY (pk),
          KEY (f05),
          KEY (f11),
          FOREIGN KEY (f03) REFERENCES t1 (f11) ON DELETE SET NULL
      ) ENGINE=InnoDB WITH SYSTEM VERSIONING;
       
      INSERT IGNORE INTO t1 VALUES
          (1,'a', 'c', 'a', 1, REPEAT('a',189), 's', 'h', 'y', 'foobar', 'g', 'a', 'c') ,
          (2,'b', 'e', 'a', 2, REPEAT('a',145), 'q', 't', 'o', 'l', 'h', 'a', 'h');
       
      DELETE FROM t1 WHERE f01 = 'b';
       
      # Cleanup
      DROP TABLE t1;
      

      10.3 803d0521

      mysqld: /data/src/10.3/storage/innobase/row/row0ins.cc:3475: dberr_t row_ins_index_entry_set_vals(const dict_index_t*, dtuple_t*, const dtuple_t*): Assertion `dict_index_is_clust(index)' failed.
      191028  1:08:19 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007fc702939f12 in __GI___assert_fail (assertion=0x56176f761d56 "dict_index_is_clust(index)", file=0x56176f761f60 "/data/src/10.3/storage/innobase/row/row0ins.cc", line=3475, function=0x56176f766140 <row_ins_index_entry_set_vals(dict_index_t const*, dtuple_t*, dtuple_t const*)::__PRETTY_FUNCTION__> "dberr_t row_ins_index_entry_set_vals(const dict_index_t*, dtuple_t*, const dtuple_t*)") at assert.c:101
      #8  0x000056176ef95959 in row_ins_index_entry_set_vals (index=0x7fc6ac090e48, entry=0x7fc6ac040be8, row=0x7fc6ac03ff20) at /data/src/10.3/storage/innobase/row/row0ins.cc:3475
      #9  0x000056176ef95a54 in row_ins_index_entry_step (node=0x7fc6ac040118, thr=0x7fc6ac03ae08) at /data/src/10.3/storage/innobase/row/row0ins.cc:3500
      #10 0x000056176ef95f3c in row_ins (node=0x7fc6ac040118, thr=0x7fc6ac03ae08) at /data/src/10.3/storage/innobase/row/row0ins.cc:3644
      #11 0x000056176ef966e4 in row_ins_step (thr=0x7fc6ac03ae08) at /data/src/10.3/storage/innobase/row/row0ins.cc:3787
      #12 0x000056176efbef36 in row_update_vers_insert (thr=0x7fc6ac03ae08, node=0x7fc6ac03ee48) at /data/src/10.3/storage/innobase/row/row0mysql.cc:2191
      #13 0x000056176efbf0c7 in row_update_cascade_for_mysql (thr=0x7fc6ac03ae08, node=0x7fc6ac03ee48, table=0x7fc6ac06fea8) at /data/src/10.3/storage/innobase/row/row0mysql.cc:2247
      #14 0x000056176ef8fce1 in row_ins_foreign_check_on_constraint (thr=0x7fc6ac03ae08, foreign=0x7fc6ac08b548, pcur=0x7fc6fc534bd0, entry=0x7fc6ac0908e0, mtr=0x7fc6fc535030) at /data/src/10.3/storage/innobase/row/row0ins.cc:1441
      #15 0x000056176ef90db4 in row_ins_check_foreign_constraint (check_ref=0, foreign=0x7fc6ac08b548, table=0x7fc6ac06fea8, entry=0x7fc6ac0908e0, thr=0x7fc6ac03ae08) at /data/src/10.3/storage/innobase/row/row0ins.cc:1864
      #16 0x000056176f023bf4 in row_upd_check_references_constraints (node=0x7fc6ac03a890, pcur=0x7fc6fc5356c0, table=0x7fc6ac06fea8, index=0x7fc6ac08abd8, offsets=0x7fc6ac03ea48, thr=0x7fc6ac03ae08, mtr=0x7fc6fc535c40) at /data/src/10.3/storage/innobase/row/row0upd.cc:296
      #17 0x000056176f029b80 in row_upd_sec_index_entry (node=0x7fc6ac03a890, thr=0x7fc6ac03ae08) at /data/src/10.3/storage/innobase/row/row0upd.cc:2510
      #18 0x000056176f029edb in row_upd_sec_step (node=0x7fc6ac03a890, thr=0x7fc6ac03ae08) at /data/src/10.3/storage/innobase/row/row0upd.cc:2559
      #19 0x000056176f02cc7a in row_upd (node=0x7fc6ac03a890, thr=0x7fc6ac03ae08) at /data/src/10.3/storage/innobase/row/row0upd.cc:3326
      #20 0x000056176f02d0c7 in row_upd_step (thr=0x7fc6ac03ae08) at /data/src/10.3/storage/innobase/row/row0upd.cc:3441
      #21 0x000056176efbe25a in row_update_for_mysql (prebuilt=0x7fc6ac06dd58) at /data/src/10.3/storage/innobase/row/row0mysql.cc:1888
      #22 0x000056176ee29e41 in ha_innobase::update_row (this=0x7fc6ac00ae88, old_row=0x7fc6ac0a4118 "", new_row=0x7fc6ac0a32d8 "") at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:8850
      #23 0x000056176ec0919c in handler::ha_update_row (this=0x7fc6ac00ae88, old_data=0x7fc6ac0a4118 "", new_data=0x7fc6ac0a32d8 "") at /data/src/10.3/sql/handler.cc:6478
      #24 0x000056176edb05d1 in TABLE::delete_row (this=0x7fc6ac06d110) at /data/src/10.3/sql/sql_delete.cc:257
      #25 0x000056176edad7cc in mysql_delete (thd=0x7fc6ac000b00, table_list=0x7fc6ac012900, conds=0x7fc6ac013108, order_list=0x7fc6ac0053c8, limit=18446744073709551615, options=0, result=0x0) at /data/src/10.3/sql/sql_delete.cc:750
      #26 0x000056176e8e38ee in mysql_execute_command (thd=0x7fc6ac000b00) at /data/src/10.3/sql/sql_parse.cc:4658
      #27 0x000056176e8ee41b in mysql_parse (thd=0x7fc6ac000b00, rawbuf=0x7fc6ac012818 "DELETE FROM t1 WHERE f01 = 'b'", length=30, parser_state=0x7fc6fc5375e0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7834
      #28 0x000056176e8daf8d in dispatch_command (command=COM_QUERY, thd=0x7fc6ac000b00, packet=0x7fc6ac15fe41 "DELETE FROM t1 WHERE f01 = 'b'", packet_length=30, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1856
      #29 0x000056176e8d98d5 in do_command (thd=0x7fc6ac000b00) at /data/src/10.3/sql/sql_parse.cc:1401
      #30 0x000056176ea50894 in do_handle_one_connection (connect=0x56177295f550) at /data/src/10.3/sql/sql_connect.cc:1403
      #31 0x000056176ea505f6 in handle_one_connection (arg=0x56177295f550) at /data/src/10.3/sql/sql_connect.cc:1308
      #32 0x000056176f3fec2c in pfs_spawn_thread (arg=0x5617728a4b40) at /data/src/10.3/storage/perfschema/pfs.cc:1862
      #33 0x00007fc7044af4a4 in start_thread (arg=0x7fc6fc538700) at pthread_create.c:456
      #34 0x00007fc7029f6d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      Reproducible on 10.3-10.5. Not reproducible with this test case with other values of innodb_page_size, but it might be the matter of specific data.
      No obvious problem on a non-debug build.

      Attachments

        1. clust1.test
          55 kB
          Elena Stepanova

        Issue Links

          Activity

            People

              Unassigned Unassigned
              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.