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

Assertion `trx->bulk_insert' failed in trx_undo_report_row_operation on INSERT

    XMLWordPrintable

Details

    Description

      Discussed with marko. Further to MDEV-25315.

      SET foreign_key_checks=0,unique_checks=0;
      CREATE TABLE t (i INT) ENGINE=InnoDB PARTITION BY HASH (i) PARTITIONS 3;
      INSERT INTO t VALUES (0);
      INSERT INTO t VALUES (0x40),(0x41),(0x42),(0x43),(0x44),(0x45),(0x46),(0x47);
      

      Leads to:

      10.6.0 a3e3225cd3b816d47621e749e21a71b6a864a96a (Debug)

      mysqld: /test/10.6_dbg/storage/innobase/trx/trx0rec.cc:2037: dberr_t trx_undo_report_row_operation(que_thr_t*, dict_index_t*, const dtuple_t*, const upd_t*, ulint, const rec_t*, const rec_offs*, roll_ptr_t*): Assertion `trx->bulk_insert' failed.
      

      10.6.0 a3e3225cd3b816d47621e749e21a71b6a864a96a (Debug)

      Core was generated by `/test/MD150421-mariadb-10.6.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      [Current thread is 1 (Thread 0x1539dc162700 (LWP 3412208))]
      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x00001539f11d1859 in __GI_abort () at abort.c:79
      #2  0x00001539f11d1729 in __assert_fail_base (fmt=0x1539f1367588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55a1988f4c55 "trx->bulk_insert", file=0x55a1988f4d70 "/test/10.6_dbg/storage/innobase/trx/trx0rec.cc", line=2037, function=<optimized out>) at assert.c:92
      #3  0x00001539f11e2f36 in __GI___assert_fail (assertion=assertion@entry=0x55a1988f4c55 "trx->bulk_insert", file=file@entry=0x55a1988f4d70 "/test/10.6_dbg/storage/innobase/trx/trx0rec.cc", line=line@entry=2037, function=function@entry=0x55a1988f58f8 "dberr_t trx_undo_report_row_operation(que_thr_t*, dict_index_t*, const dtuple_t*, const upd_t*, ulint, const rec_t*, const rec_offs*, roll_ptr_t*)") at assert.c:101
      #4  0x000055a1982985b7 in trx_undo_report_row_operation (thr=thr@entry=0x153998038a40, index=index@entry=0x15399802a5d8, clust_entry=clust_entry@entry=0x153998027a38, update=update@entry=0x0, cmpl_info=cmpl_info@entry=0, rec=rec@entry=0x0, offsets=0x0, roll_ptr=0x1539dc15f060) at /test/10.6_dbg/storage/innobase/trx/trx0rec.cc:2037
      #5  0x000055a1982f4c9f in btr_cur_ins_lock_and_undo (flags=flags@entry=0, cursor=cursor@entry=0x1539dc15f570, entry=entry@entry=0x153998027a38, thr=thr@entry=0x153998038a40, mtr=mtr@entry=0x1539dc15fb20, inherit=inherit@entry=0x1539dc15f147) at /test/10.6_dbg/storage/innobase/btr/btr0cur.cc:3299
      #6  0x000055a1982fb79f in btr_cur_optimistic_insert (flags=flags@entry=0, cursor=cursor@entry=0x1539dc15f570, offsets=offsets@entry=0x1539dc15f538, heap=heap@entry=0x1539dc15f530, entry=entry@entry=0x153998027a38, rec=rec@entry=0x1539dc15f548, big_rec=0x1539dc15f528, n_ext=<optimized out>, thr=0x153998038a40, mtr=0x1539dc15fb20) at /test/10.6_dbg/storage/innobase/btr/btr0cur.cc:3526
      #7  0x000055a1981d476c in row_ins_clust_index_entry_low (flags=flags@entry=0, mode=<optimized out>, mode@entry=2, index=index@entry=0x15399802a5d8, n_uniq=n_uniq@entry=0, entry=entry@entry=0x153998027a38, n_ext=n_ext@entry=0, thr=<optimized out>) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:2790
      #8  0x000055a1981d6331 in row_ins_clust_index_entry (index=index@entry=0x15399802a5d8, entry=entry@entry=0x153998027a38, thr=thr@entry=0x153998038a40, n_ext=n_ext@entry=0) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3263
      #9  0x000055a1981daf0a in row_ins_index_entry (thr=0x153998038a40, entry=0x153998027a38, index=0x15399802a5d8) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3388
      #10 row_ins_index_entry_step (thr=0x153998038a40, node=0x153998038828) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3557
      #11 row_ins (thr=0x153998038a40, node=0x153998038828) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3703
      #12 row_ins_step (thr=thr@entry=0x153998038a40) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3845
      #13 0x000055a1981ff8e0 in row_insert_for_mysql (mysql_rec=mysql_rec@entry=0x153998024d28 "\375C", prebuilt=0x153998038338, ins_mode=ROW_INS_NORMAL) at /test/10.6_dbg/storage/innobase/row/row0mysql.cc:1395
      #14 0x000055a19808573a in ha_innobase::write_row (this=0x153998033350, record=0x153998024d28 "\375C") at /test/10.6_dbg/storage/innobase/handler/ha_innodb.cc:7424
      #15 0x000055a197c90f0d in handler::ha_write_row (this=0x153998033350, buf=buf@entry=0x153998024d28 "\375C") at /test/10.6_dbg/sql/handler.cc:7156
      #16 0x000055a197fb79d1 in ha_partition::write_row (this=0x153998032200, buf=0x153998024d28 "\375C") at /test/10.6_dbg/sql/ha_partition.cc:4475
      #17 0x000055a197c90f0d in handler::ha_write_row (this=0x153998032200, buf=0x153998024d28 "\375C") at /test/10.6_dbg/sql/handler.cc:7156
      #18 0x000055a19796abfd in write_record (thd=thd@entry=0x153998000db8, table=table@entry=0x15399801f838, info=info@entry=0x1539dc160d00, sink=sink@entry=0x0) at /test/10.6_dbg/sql/sql_insert.cc:2106
      #19 0x000055a197976474 in mysql_insert (thd=thd@entry=0x153998000db8, table_list=0x153998013cf0, fields=@0x153998005e60: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55a198f8c280 <end_of_list>, last = 0x153998005e60, elements = 0}, <No data fields>}, values_list=@0x153998005ea8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x153998014928, last = 0x153998014f10, elements = 8}, <No data fields>}, update_fields=@0x153998005e90: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55a198f8c280 <end_of_list>, last = 0x153998005e90, elements = 0}, <No data fields>}, update_values=@0x153998005e78: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55a198f8c280 <end_of_list>, last = 0x153998005e78, elements = 0}, <No data fields>}, duplic=DUP_ERROR, ignore=false, result=0x0) at /test/10.6_dbg/sql/sql_insert.cc:1099
      #20 0x000055a1979bd1ac in mysql_execute_command (thd=thd@entry=0x153998000db8) at /test/10.6_dbg/sql/sql_parse.cc:4559
      #21 0x000055a1979a7a06 in mysql_parse (thd=thd@entry=0x153998000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x1539dc161410) at /test/10.6_dbg/sql/sql_parse.cc:8017
      #22 0x000055a1979b67df in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x153998000db8, packet=packet@entry=0x15399800b369 "INSERT INTO t VALUES (0x40),(0x41),(0x42),(0x43),(0x44),(0x45),(0x46),(0x47)", packet_length=packet_length@entry=76, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_class.h:1331
      #23 0x000055a1979b9bd5 in do_command (thd=0x153998000db8, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_parse.cc:1406
      #24 0x000055a197b1377c in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55a19ab7a6e8, put_in_cache=put_in_cache@entry=true) at /test/10.6_dbg/sql/sql_connect.cc:1410
      #25 0x000055a197b13d81 in handle_one_connection (arg=arg@entry=0x55a19ab7a6e8) at /test/10.6_dbg/sql/sql_connect.cc:1312
      #26 0x000055a197fc1a03 in pfs_spawn_thread (arg=0x55a19aa90aa8) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
      #27 0x00001539f16df609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #28 0x00001539f12ce293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      10.6.0 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.2.38 (dbg), 10.2.38 (opt), 10.3.29 (dbg), 10.3.29 (opt), 10.4.19 (dbg), 10.4.19 (opt), 10.5.10 (dbg), 10.5.10 (opt), 10.6.0 (opt)
      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.33 (dbg), 5.7.33 (opt), 8.0.23 (dbg), 8.0.23 (opt)

      Attachments

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              Roel Roel Van de Paar
              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.