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

Assertion `thr->graph->trx->id == trx_read_trx_id( static_cast<const byte*>( trx_id->data)) || static_cast<ins_node_t*>( thr->run_node)->bulk_insert' failed in btr_cur_optimistic_insert

    XMLWordPrintable

Details

    Description

      LOCK TABLES performance_schema.setup_consumers WRITE;
      CREATE TEMPORARY TABLE t (c INT);
      SET SESSION TRANSACTION READ ONLY;
      INSERT INTO t VALUES(1);
      INSERT INTO t VALUES(2);
      

      Leads to:

      10.6.0 3f871b339429441ad907ecf7dfabdc414797e664 (Debug)

      mysqld: /data/builds/10.6_dbg/storage/innobase/btr/btr0cur.cc:3524: dberr_t btr_cur_optimistic_insert(ulint, btr_cur_t*, rec_offs**, mem_heap_t**, dtuple_t*, rec_t**, big_rec_t**, ulint, que_thr_t*, mtr_t*): Assertion `thr->graph->trx->id == trx_read_trx_id( static_cast<const byte*>( trx_id->data)) || static_cast<ins_node_t*>( thr->run_node)->bulk_insert' failed.
      

      10.6.0 3f871b339429441ad907ecf7dfabdc414797e664 (Debug)

      Core was generated by `/test/MD260121-mariadb-10.6.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      [Current thread is 1 (Thread 0x14b520e9f700 (LWP 594561))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x000055d9d9015210 in my_write_core (sig=sig@entry=6) at /data/builds/10.6_dbg/mysys/stacktrace.c:424
      #2  0x000055d9d87aa2d0 in handle_fatal_signal (sig=6) at /data/builds/10.6_dbg/sql/signal_handler.cc:330
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #5  0x000014b535d16859 in __GI_abort () at abort.c:79
      #6  0x000014b535d16729 in __assert_fail_base (fmt=0x14b535eac588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55d9d9433710 "thr->graph->trx->id == trx_read_trx_id( static_cast<const byte*>( trx_id->data)) || static_cast<ins_node_t*>( thr->run_node)->bulk_insert", file=0x55d9d9432768 "/data/builds/10.6_dbg/storage/innobase/btr/btr0cur.cc", line=3524, function=<optimized out>) at assert.c:92
      #7  0x000014b535d27f36 in __GI___assert_fail (assertion=assertion@entry=0x55d9d9433710 "thr->graph->trx->id == trx_read_trx_id( static_cast<const byte*>( trx_id->data)) || static_cast<ins_node_t*>( thr->run_node)->bulk_insert", file=file@entry=0x55d9d9432768 "/data/builds/10.6_dbg/storage/innobase/btr/btr0cur.cc", line=line@entry=3524, function=function@entry=0x55d9d9433620 "dberr_t btr_cur_optimistic_insert(ulint, btr_cur_t*, rec_offs**, mem_heap_t**, dtuple_t*, rec_t**, big_rec_t**, ulint, que_thr_t*, mtr_t*)") at assert.c:101
      #8  0x000055d9d8e2a917 in btr_cur_optimistic_insert (flags=flags@entry=2, cursor=cursor@entry=0x14b520e9c5c0, offsets=offsets@entry=0x14b520e9c588, heap=heap@entry=0x14b520e9c580, entry=entry@entry=0x14b4e802cce8, rec=rec@entry=0x14b520e9c598, big_rec=0x14b520e9c578, n_ext=<optimized out>, thr=0x14b4e802a150, mtr=0x14b520e9cb80) at /data/builds/10.6_dbg/storage/innobase/include/trx0sys.h:102
      #9  0x000055d9d8d01bca in row_ins_clust_index_entry_low (flags=flags@entry=2, mode=<optimized out>, mode@entry=2, index=index@entry=0x14b4e8028388, n_uniq=n_uniq@entry=0, entry=entry@entry=0x14b4e802cce8, n_ext=n_ext@entry=0, thr=<optimized out>) at /data/builds/10.6_dbg/storage/innobase/row/row0ins.cc:2786
      #10 0x000055d9d8d0378e in row_ins_clust_index_entry (index=index@entry=0x14b4e8028388, entry=entry@entry=0x14b4e802cce8, thr=thr@entry=0x14b4e802a150, n_ext=n_ext@entry=0) at /data/builds/10.6_dbg/storage/innobase/row/row0ins.cc:3258
      #11 0x000055d9d8d08344 in row_ins_index_entry (thr=0x14b4e802a150, entry=0x14b4e802cce8, index=0x14b4e8028388) at /data/builds/10.6_dbg/storage/innobase/row/row0ins.cc:3383
      #12 row_ins_index_entry_step (thr=0x14b4e802a150, node=0x14b4e8029f20) at /data/builds/10.6_dbg/storage/innobase/row/row0ins.cc:3552
      #13 row_ins (thr=0x14b4e802a150, node=0x14b4e8029f20) at /data/builds/10.6_dbg/storage/innobase/row/row0ins.cc:3698
      #14 row_ins_step (thr=thr@entry=0x14b4e802a150) at /data/builds/10.6_dbg/storage/innobase/row/row0ins.cc:3840
      #15 0x000055d9d8d2cbef in row_insert_for_mysql (mysql_rec=mysql_rec@entry=0x14b4e8028d68 "\375\002", prebuilt=0x14b4e8029a28, ins_mode=ROW_INS_NORMAL) at /data/builds/10.6_dbg/storage/innobase/row/row0mysql.cc:1427
      #16 0x000055d9d8bb5d8a in ha_innobase::write_row (this=0x14b4e80291d0, record=0x14b4e8028d68 "\375\002") at /data/builds/10.6_dbg/storage/innobase/handler/ha_innodb.cc:7338
      #17 0x000055d9d87be618 in handler::ha_write_row (this=0x14b4e80291d0, buf=0x14b4e8028d68 "\375\002") at /data/builds/10.6_dbg/sql/handler.cc:7151
      #18 0x000055d9d84944ad in write_record (thd=thd@entry=0x14b4e8000db8, table=table@entry=0x14b4e8026b38, info=info@entry=0x14b520e9dc60, sink=sink@entry=0x0) at /data/builds/10.6_dbg/sql/sql_insert.cc:2106
      #19 0x000055d9d84a0b4e in mysql_insert (thd=thd@entry=0x14b4e8000db8, table_list=0x14b4e8012790, fields=@0x14b4e8005e28: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55d9d9ab82e0 <end_of_list>, last = 0x14b4e8005e28, elements = 0}, <No data fields>}, values_list=@0x14b4e8005e70: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14b4e8013398, last = 0x14b4e8013398, elements = 1}, <No data fields>}, update_fields=@0x14b4e8005e58: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55d9d9ab82e0 <end_of_list>, last = 0x14b4e8005e58, elements = 0}, <No data fields>}, update_values=@0x14b4e8005e40: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55d9d9ab82e0 <end_of_list>, last = 0x14b4e8005e40, elements = 0}, <No data fields>}, duplic=DUP_ERROR, ignore=false, result=0x0) at /data/builds/10.6_dbg/sql/sql_insert.cc:1099
      #20 0x000055d9d84e76a8 in mysql_execute_command (thd=thd@entry=0x14b4e8000db8) at /data/builds/10.6_dbg/sql/sql_parse.cc:4448
      #21 0x000055d9d84d215e in mysql_parse (thd=thd@entry=0x14b4e8000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14b520e9e3d0) at /data/builds/10.6_dbg/sql/sql_parse.cc:7901
      #22 0x000055d9d84e024f in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14b4e8000db8, packet=packet@entry=0x14b4e801aac9 "INSERT INTO t VALUES(2)", packet_length=packet_length@entry=23) at /data/builds/10.6_dbg/sql/sql_class.h:1294
      #23 0x000055d9d84e3581 in do_command (thd=0x14b4e8000db8) at /data/builds/10.6_dbg/sql/sql_parse.cc:1365
      #24 0x000055d9d863f079 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55d9dc7ae248, put_in_cache=put_in_cache@entry=true) at /data/builds/10.6_dbg/sql/sql_connect.cc:1410
      #25 0x000055d9d863f77d in handle_one_connection (arg=arg@entry=0x55d9dc7ae248) at /data/builds/10.6_dbg/sql/sql_connect.cc:1312
      #26 0x000055d9d8af243f in pfs_spawn_thread (arg=0x55d9dc6e2288) at /data/builds/10.6_dbg/storage/perfschema/pfs.cc:2201
      #27 0x000014b536224609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #28 0x000014b535e13293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.6.0 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.2.37 (dbg), 10.2.37 (opt), 10.3.28 (dbg), 10.3.28 (opt), 10.4.18 (dbg), 10.4.18 (opt), 10.5.9 (dbg), 10.5.9 (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.