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

SIGABRT: Assertion `id' failed in trx_write_trx_id on INSERT | Assertion `id > 0' failed in trx_write_trx_id | Assertion `val > 0' failed in row_upd_index_entry_sys_field | Assertion `thr_get_trx(thr)->id || index->table->no_rollback()' failed.

    XMLWordPrintable

Details

    Description

      CREATE TABLE t (c INT) ENGINE=InnoDB;
      INSERT INTO t VALUES(0);
      CREATE TEMPORARY TABLE t2 (c INT) ENGINE=InnoDB;
      START TRANSACTION READ ONLY;
      INSERT INTO t2 SELECT * FROM t;
      

      OR

      USE test;
      CREATE TEMPORARY TABLE t (c INT,c2 INT) ENGINE=InnoDB;
      START TRANSACTION READ ONLY;
      INSERT INTO t VALUES(0);
      SAVEPOINT s;
      INSERT INTO t VALUES(0,0);
      

      Leads to:

      10.5.3 364e7a9ae6b5fbf69494cec30733b5ad28738cbb

      mysqld: /test/10.5_dbg/storage/innobase/include/trx0sys.h:92: void trx_write_trx_id(byte*, trx_id_t): Assertion `id' failed.
      

      10.5.3 364e7a9ae6b5fbf69494cec30733b5ad28738cbb

      Core was generated by `/test/MD110420-mariadb-10.5.3-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:57
      [Current thread is 1 (Thread 0x7f1c88a03700 (LWP 12982))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      #1  0x000055f4f3f8721e in my_write_core (sig=sig@entry=6) at /test/10.5_dbg/mysys/stacktrace.c:518
      #2  0x000055f4f372d08f in handle_fatal_signal (sig=6) at /test/10.5_dbg/sql/signal_handler.cc:329
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
      #5  0x00007f1c87147801 in __GI_abort () at abort.c:79
      #6  0x00007f1c8713739a in __assert_fail_base (fmt=0x7f1c872be7d8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x55f4f4385ca9 "id", file=file@entry=0x55f4f437bd18 "/test/10.5_dbg/storage/innobase/include/trx0sys.h", line=line@entry=92, function=function@entry=0x55f4f43c3b20 <_ZZL16trx_write_trx_idPhmE19__PRETTY_FUNCTION__> "void trx_write_trx_id(byte*, trx_id_t)") at assert.c:92
      #7  0x00007f1c87137412 in __GI___assert_fail (assertion=assertion@entry=0x55f4f4385ca9 "id", file=file@entry=0x55f4f437bd18 "/test/10.5_dbg/storage/innobase/include/trx0sys.h", line=line@entry=92, function=function@entry=0x55f4f43c3b20 <_ZZL16trx_write_trx_idPhmE19__PRETTY_FUNCTION__> "void trx_write_trx_id(byte*, trx_id_t)") at assert.c:101
      #8  0x000055f4f3c45a1e in trx_write_trx_id (id=0, db_trx_id=0x7f1c5b574626 "") at /test/10.5_dbg/storage/innobase/include/trx0sys.h:92
      #9  row_ins_step (thr=thr@entry=0x7f1c5b5747b8) at /test/10.5_dbg/storage/innobase/row/row0ins.cc:3720
      #10 0x000055f4f3c65ead in row_insert_for_mysql (mysql_rec=mysql_rec@entry=0x7f1c5b44eba8 <incomplete sequence \375>, prebuilt=0x7f1c5b574098, ins_mode=<optimized out>) at /test/10.5_dbg/storage/innobase/row/row0mysql.cc:1462
      #11 0x000055f4f3afd47d in ha_innobase::write_row (this=0x7f1c5b555aa0, record=0x7f1c5b44eba8 <incomplete sequence \375>) at /test/10.5_dbg/storage/innobase/handler/ha_innodb.cc:7771
      #12 0x000055f4f3741011 in handler::ha_write_row (this=0x7f1c5b555aa0, buf=0x7f1c5b44eba8 <incomplete sequence \375>) at /test/10.5_dbg/sql/handler.cc:6950
      #13 0x000055f4f34426db in write_record (thd=0x7f1c5b415088, table=0x7f1c5b573088, info=info@entry=0x7f1c5b475e20, sink=0x0) at /test/10.5_dbg/sql/sql_insert.cc:2091
      #14 0x000055f4f3442b09 in select_insert::send_data (this=0x7f1c5b475dd0, values=...) at /test/10.5_dbg/sql/sql_insert.cc:4049
      #15 0x000055f4f34da251 in select_result_sink::send_data_with_check (sent=<optimized out>, u=<optimized out>, items=..., this=<optimized out>) at /test/10.5_dbg/sql/sql_class.h:5236
      #16 end_send (join=0x7f1c5b475e88, join_tab=0x7f1c5b477598, end_of_records=<optimized out>) at /test/10.5_dbg/sql/sql_select.cc:21799
      #17 0x000055f4f34c24d1 in evaluate_join_record (join=join@entry=0x7f1c5b475e88, join_tab=join_tab@entry=0x7f1c5b4771f0, error=error@entry=0) at /test/10.5_dbg/sql/sql_select.cc:20828
      #18 0x000055f4f34c984f in sub_select (join=0x7f1c5b475e88, join_tab=0x7f1c5b4771f0, end_of_records=<optimized out>) at /test/10.5_dbg/sql/sql_select.cc:20605
      #19 0x000055f4f3501650 in do_select (procedure=0x0, join=0x7f1c5b475e88) at /test/10.5_dbg/sql/sql_select.cc:20139
      #20 JOIN::exec_inner (this=this@entry=0x7f1c5b475e88) at /test/10.5_dbg/sql/sql_select.cc:4463
      #21 0x000055f4f3501c6b in JOIN::exec (this=this@entry=0x7f1c5b475e88) at /test/10.5_dbg/sql/sql_select.cc:4244
      #22 0x000055f4f34fff80 in mysql_select (thd=thd@entry=0x7f1c5b415088, tables=<optimized out>, fields=..., conds=0x0, og_num=0, order=<optimized out>, group=0x0, having=0x0, proc_param=0x0, select_options=2202245794560, result=0x7f1c5b475dd0, unit=0x7f1c5b419090, select_lex=0x7f1c5b474860) at /test/10.5_dbg/sql/sql_select.cc:4668
      #23 0x000055f4f35002af in handle_select (thd=thd@entry=0x7f1c5b415088, lex=lex@entry=0x7f1c5b418fc8, result=result@entry=0x7f1c5b475dd0, setup_tables_done_option=setup_tables_done_option@entry=1073741824) at /test/10.5_dbg/sql/sql_select.cc:417
      #24 0x000055f4f3485624 in mysql_execute_command (thd=thd@entry=0x7f1c5b415088) at /test/10.5_dbg/sql/sql_parse.cc:4661
      #25 0x000055f4f34909d1 in mysql_parse (thd=thd@entry=0x7f1c5b415088, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x7f1c88a02450, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:7953
      #26 0x000055f4f347c719 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7f1c5b415088, packet=packet@entry=0x7f1c5b467089 "INSERT INTO t2 SELECT * FROM t", packet_length=packet_length@entry=30, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:1839
      #27 0x000055f4f347af6f in do_command (thd=0x7f1c5b415088) at /test/10.5_dbg/sql/sql_parse.cc:1358
      #28 0x000055f4f35d5a53 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x7f1c5f4433a8, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1422
      #29 0x000055f4f35d5d82 in handle_one_connection (arg=arg@entry=0x7f1c5f4433a8) at /test/10.5_dbg/sql/sql_connect.cc:1319
      #30 0x000055f4f3a36080 in pfs_spawn_thread (arg=0x7f1c86445888) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
      #31 0x00007f1c87e2a6db in start_thread (arg=0x7f1c88a03700) at pthread_create.c:463
      #32 0x00007f1c8722888f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.2.32 (dbg), 10.3.23 (dbg), 10.4.13 (dbg), 10.5.2 (dbg), 10.5.3 (dbg)

      Bug confirmed not present in:
      MariaDB: 10.1.45 (dbg), 10.1.45 (opt), 10.2.32 (opt), 10.3.23 (opt), 10.4.13 (opt), 10.5.2 (opt), 10.5.3 (opt)
      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.47 (dbg), 5.6.47 (opt), 5.7.29 (dbg), 5.7.29 (opt), 8.0.19 (dbg), 8.0.19 (opt)

      Attachments

        Issue Links

          Activity

            People

              kevg Eugene Kosov (Inactive)
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.