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

Assertion `col->ord_part' or `f.col->ord_part' failed in row_build_index_entry_low, assertion: buf != field_ref_zero in row_merge_buf_add

    XMLWordPrintable

Details

    Description

      Note: See also MDEV-21137 which has a similar test case but a different outcome. Possibly there is a relation.

      --source include/have_innodb.inc
       
      CREATE TABLE t1 (f1 INT, f2 TEXT, f3 INT, FULLTEXT (f2), KEY(f1), KEY(f3), FOREIGN KEY r (f3) REFERENCES t1 (f1) ON DELETE SET NULL) WITH SYSTEM VERSIONING ENGINE=InnoDB;
      INSERT INTO t1 VALUES (1,REPEAT('a',8193),1),(1,REPEAT('b',8193),1);
      DELETE FROM t1;
       
      # Cleanup
      DROP TABLE t1;
      

      10.3 a1454426

      mysqld: /data/src/10.3/storage/innobase/row/row0row.cc:315: dtuple_t* row_build_index_entry_low(const dtuple_t*, const row_ext_t*, const dict_index_t*, mem_heap_t*, ulint): Assertion `col->ord_part' failed.
      191123 22:18:40 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f9a5e047f12 in __GI___assert_fail (assertion=0x557d6d3be880 "col->ord_part", file=0x557d6d3be718 "/data/src/10.3/storage/innobase/row/row0row.cc", line=315, function=0x557d6d3bf1a0 <row_build_index_entry_low(dtuple_t const*, row_ext_t const*, dict_index_t const*, mem_block_info_t*, unsigned long)::__PRETTY_FUNCTION__> "dtuple_t* row_build_index_entry_low(const dtuple_t*, const row_ext_t*, const dict_index_t*, mem_heap_t*, ulint)") at assert.c:101
      #8  0x0000557d6cc2f54d in row_build_index_entry_low (row=0x7f9a04054ae0, ext=0x0, index=0x7f9a0406ec28, heap=0x7f9a0404e110, flag=3) at /data/src/10.3/storage/innobase/row/row0row.cc:315
      #9  0x0000557d6cbcb366 in ins_node_create_entry_list (node=0x7f9a04054c00) at /data/src/10.3/storage/innobase/row/row0ins.cc:122
      #10 0x0000557d6cbcb695 in ins_node_set_new_row (node=0x7f9a04054c00, row=0x7f9a04054ae0) at /data/src/10.3/storage/innobase/row/row0ins.cc:200
      #11 0x0000557d6cbfe06d in row_update_vers_insert (thr=0x7f9a040476f8, node=0x7f9a0404d728) at /data/src/10.3/storage/innobase/row/row0mysql.cc:2176
      #12 0x0000557d6cbfe2d5 in row_update_cascade_for_mysql (thr=0x7f9a040476f8, node=0x7f9a0404d728, table=0x7f9a0400c278) at /data/src/10.3/storage/innobase/row/row0mysql.cc:2247
      #13 0x0000557d6cbcf003 in row_ins_foreign_check_on_constraint (thr=0x7f9a040476f8, foreign=0x7f9a0406d198, pcur=0x7f9a5339ea70, entry=0x7f9a0404d4a8, mtr=0x7f9a5339eed0) at /data/src/10.3/storage/innobase/row/row0ins.cc:1441
      #14 0x0000557d6cbd00d6 in row_ins_check_foreign_constraint (check_ref=0, foreign=0x7f9a0406d198, table=0x7f9a0400c278, entry=0x7f9a0404d4a8, thr=0x7f9a040476f8) at /data/src/10.3/storage/innobase/row/row0ins.cc:1864
      #15 0x0000557d6cc62821 in row_upd_check_references_constraints (node=0x7f9a04042e90, pcur=0x7f9a5339f550, table=0x7f9a0400c278, index=0x7f9a040a5358, offsets=0x7f9a0404cef0, thr=0x7f9a040476f8, mtr=0x7f9a5339fc50) at /data/src/10.3/storage/innobase/row/row0upd.cc:296
      #16 0x0000557d6cc68932 in row_upd_sec_index_entry (node=0x7f9a04042e90, thr=0x7f9a040476f8) at /data/src/10.3/storage/innobase/row/row0upd.cc:2520
      #17 0x0000557d6cc68ca1 in row_upd_sec_step (node=0x7f9a04042e90, thr=0x7f9a040476f8) at /data/src/10.3/storage/innobase/row/row0upd.cc:2569
      #18 0x0000557d6cc6ba3d in row_upd (node=0x7f9a04042e90, thr=0x7f9a040476f8) at /data/src/10.3/storage/innobase/row/row0upd.cc:3336
      #19 0x0000557d6cc6be8a in row_upd_step (thr=0x7f9a040476f8) at /data/src/10.3/storage/innobase/row/row0upd.cc:3451
      #20 0x0000557d6cbfd468 in row_update_for_mysql (prebuilt=0x7f9a04042258) at /data/src/10.3/storage/innobase/row/row0mysql.cc:1888
      #21 0x0000557d6ca695a7 in ha_innobase::update_row (this=0x7f9a040411e8, old_row=0x7f9a04033198 "\370\001", new_row=0x7f9a04033170 "\370\001") at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:8849
      #22 0x0000557d6c848248 in handler::ha_update_row (this=0x7f9a040411e8, old_data=0x7f9a04033198 "\370\001", new_data=0x7f9a04033170 "\370\001") at /data/src/10.3/sql/handler.cc:6478
      #23 0x0000557d6c9ef67d in TABLE::delete_row (this=0x7f9a040405a0) at /data/src/10.3/sql/sql_delete.cc:257
      #24 0x0000557d6c9ec878 in mysql_delete (thd=0x7f9a04000af0, table_list=0x7f9a040128d0, conds=0x0, order_list=0x7f9a040053b8, limit=18446744073709551615, options=0, result=0x0) at /data/src/10.3/sql/sql_delete.cc:750
      #25 0x0000557d6c52297c in mysql_execute_command (thd=0x7f9a04000af0) at /data/src/10.3/sql/sql_parse.cc:4658
      #26 0x0000557d6c52d497 in mysql_parse (thd=0x7f9a04000af0, rawbuf=0x7f9a04012808 "DELETE FROM t1", length=14, parser_state=0x7f9a533a15e0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7815
      #27 0x0000557d6c51a01b in dispatch_command (command=COM_QUERY, thd=0x7f9a04000af0, packet=0x7f9a0415fe61 "DELETE FROM t1", packet_length=14, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1856
      #28 0x0000557d6c518963 in do_command (thd=0x7f9a04000af0) at /data/src/10.3/sql/sql_parse.cc:1401
      #29 0x0000557d6c68f8fa in do_handle_one_connection (connect=0x557d6fa294d0) at /data/src/10.3/sql/sql_connect.cc:1403
      #30 0x0000557d6c68f65c in handle_one_connection (arg=0x557d6fa294d0) at /data/src/10.3/sql/sql_connect.cc:1308
      #31 0x0000557d6d03c0a8 in pfs_spawn_thread (arg=0x557d6f973300) at /data/src/10.3/storage/perfschema/pfs.cc:1862
      #32 0x00007f9a5fbbd4a4 in start_thread (arg=0x7f9a533a2700) at pthread_create.c:456
      #33 0x00007f9a5e104d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      10.4 f9528821

      mysqld: /data/src/10.4/storage/innobase/row/row0row.cc:317: dtuple_t* row_build_index_entry_low(const dtuple_t*, const row_ext_t*, const dict_index_t*, mem_heap_t*, ulint): Assertion `f.col->ord_part' failed.
      191123 22:19:34 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007fdb2bae5f12 in __GI___assert_fail (assertion=0x55be299ed3b0 "f.col->ord_part", file=0x55be299ed220 "/data/src/10.4/storage/innobase/row/row0row.cc", line=317, function=0x55be299edea0 <row_build_index_entry_low(dtuple_t const*, row_ext_t const*, dict_index_t const*, mem_block_info_t*, unsigned long)::__PRETTY_FUNCTION__> "dtuple_t* row_build_index_entry_low(const dtuple_t*, const row_ext_t*, const dict_index_t*, mem_heap_t*, ulint)") at assert.c:101
      #8  0x000055be291f2722 in row_build_index_entry_low (row=0x7fdad41bb070, ext=0x0, index=0x7fdad413cb88, heap=0x7fdad41b47b0, flag=3) at /data/src/10.4/storage/innobase/row/row0row.cc:317
      #9  0x000055be2918e618 in ins_node_create_entry_list (node=0x7fdad41bb190) at /data/src/10.4/storage/innobase/row/row0ins.cc:119
      #10 0x000055be2918e947 in ins_node_set_new_row (node=0x7fdad41bb190, row=0x7fdad41bb070) at /data/src/10.4/storage/innobase/row/row0ins.cc:197
      #11 0x000055be291c031b in row_update_vers_insert (thr=0x7fdad41ad5b8, node=0x7fdad41b3c38) at /data/src/10.4/storage/innobase/row/row0mysql.cc:2177
      #12 0x000055be291c058f in row_update_cascade_for_mysql (thr=0x7fdad41ad5b8, node=0x7fdad41b3c38, table=0x7fdad4149898) at /data/src/10.4/storage/innobase/row/row0mysql.cc:2248
      #13 0x000055be291922c3 in row_ins_foreign_check_on_constraint (thr=0x7fdad41ad5b8, foreign=0x7fdad4142448, pcur=0x7fdb24eb2ef0, entry=0x7fdad41b38a8, mtr=0x7fdb24eb3350) at /data/src/10.4/storage/innobase/row/row0ins.cc:1441
      #14 0x000055be29193360 in row_ins_check_foreign_constraint (check_ref=0, foreign=0x7fdad4142448, table=0x7fdad4149898, entry=0x7fdad41b38a8, thr=0x7fdad41ad5b8) at /data/src/10.4/storage/innobase/row/row0ins.cc:1850
      #15 0x000055be2921a1a3 in row_upd_check_references_constraints (node=0x7fdad4053af8, pcur=0x7fdb24eb39d0, table=0x7fdad4149898, index=0x7fdad413eee8, offsets=0x7fdad41b3480, thr=0x7fdad41ad5b8, mtr=0x7fdb24eb40d0) at /data/src/10.4/storage/innobase/row/row0upd.cc:297
      #16 0x000055be292205e2 in row_upd_sec_index_entry (node=0x7fdad4053af8, thr=0x7fdad41ad5b8) at /data/src/10.4/storage/innobase/row/row0upd.cc:2502
      #17 0x000055be29220940 in row_upd_sec_step (node=0x7fdad4053af8, thr=0x7fdad41ad5b8) at /data/src/10.4/storage/innobase/row/row0upd.cc:2549
      #18 0x000055be2922393e in row_upd (node=0x7fdad4053af8, thr=0x7fdad41ad5b8) at /data/src/10.4/storage/innobase/row/row0upd.cc:3327
      #19 0x000055be29223d84 in row_upd_step (thr=0x7fdad41ad5b8) at /data/src/10.4/storage/innobase/row/row0upd.cc:3442
      #20 0x000055be291bf706 in row_update_for_mysql (prebuilt=0x7fdad4052eb8) at /data/src/10.4/storage/innobase/row/row0mysql.cc:1889
      #21 0x000055be2901ece6 in ha_innobase::update_row (this=0x7fdad4051e38, old_row=0x7fdad40406d8 "\370\001", new_row=0x7fdad40406b0 "\370\001") at /data/src/10.4/storage/innobase/handler/ha_innodb.cc:8840
      #22 0x000055be28de076e in handler::ha_update_row (this=0x7fdad4051e38, old_data=0x7fdad40406d8 "\370\001", new_data=0x7fdad40406b0 "\370\001") at /data/src/10.4/sql/handler.cc:6719
      #23 0x000055be28f9b3a5 in TABLE::delete_row (this=0x7fdad4050fd0) at /data/src/10.4/sql/sql_delete.cc:301
      #24 0x000055be28f9821c in mysql_delete (thd=0x7fdad4000af0, table_list=0x7fdad4013200, conds=0x0, order_list=0x7fdad40054a0, limit=18446744073709551615, options=0, result=0x0) at /data/src/10.4/sql/sql_delete.cc:834
      #25 0x000055be28a74582 in mysql_execute_command (thd=0x7fdad4000af0) at /data/src/10.4/sql/sql_parse.cc:4728
      #26 0x000055be28a7fdaf in mysql_parse (thd=0x7fdad4000af0, rawbuf=0x7fdad4013138 "DELETE FROM t1", length=14, parser_state=0x7fdb24eb6170, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:7898
      #27 0x000055be28a6af8c in dispatch_command (command=COM_QUERY, thd=0x7fdad4000af0, packet=0x7fdad419de21 "DELETE FROM t1", packet_length=14, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1842
      #28 0x000055be28a69619 in do_command (thd=0x7fdad4000af0) at /data/src/10.4/sql/sql_parse.cc:1360
      #29 0x000055be28bf18d1 in do_handle_one_connection (connect=0x55be2c2bec60) at /data/src/10.4/sql/sql_connect.cc:1412
      #30 0x000055be28bf1620 in handle_one_connection (arg=0x55be2c2bec60) at /data/src/10.4/sql/sql_connect.cc:1316
      #31 0x000055be295f39a5 in pfs_spawn_thread (arg=0x55be2c1e3890) at /data/src/10.4/storage/perfschema/pfs.cc:1862
      #32 0x00007fdb2d65b4a4 in start_thread (arg=0x7fdb24eb7700) at pthread_create.c:456
      #33 0x00007fdb2bba2d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      Reproducible on 10.3-10.5.
      Non-debug build doesn't crash, DELETE fails with an error instead:

      CURRENT_TEST: bug.t
      mysqltest: At line 5: query 'DELETE FROM t1' failed: 1761: Foreign key constraint for table 't1', record '1' would lead to a duplicate entry in table 't1', key 'FTS_DOC_ID_INDEX'
      

      Attachments

        Issue Links

          Activity

            People

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