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

Assertion `!check_foreigns' failed in trx_t::check_bulk_buffer

    XMLWordPrintable

Details

    Description

      SET unique_checks=0,foreign_key_checks=0,autocommit=0;
      CREATE TABLE t (c CHAR(1));
      INSERT INTO t VALUES();
      SET SESSION foreign_key_checks=TRUE;
      CREATE TEMPORARY SEQUENCE s1;
      

      Leads to:

      10.9.0 5be92887c2caacb45af87b1131db952ce627e83a (Debug)

      mysqld: /test/10.9_dbg/storage/innobase/include/trx0trx.h:1115: trx_mod_table_time_t* trx_t::check_bulk_buffer(dict_table_t*): Assertion `!check_foreigns' failed.
      

      10.9.0 5be92887c2caacb45af87b1131db952ce627e83a (Debug)

      Core was generated by `/test/MD160322-mariadb-10.9.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 0x153d88165700 (LWP 3647790))]
      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x0000153da6dfb859 in __GI_abort () at abort.c:79
      #2  0x0000153da6dfb729 in __assert_fail_base (fmt=0x153da6f91588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x558b9310ab41 "!check_foreigns", file=0x558b931101f8 "/test/10.9_dbg/storage/innobase/include/trx0trx.h", line=1115, function=<optimized out>) at assert.c:92
      #3  0x0000153da6e0d006 in __GI___assert_fail (assertion=assertion@entry=0x558b9310ab41 "!check_foreigns", file=file@entry=0x558b931101f8 "/test/10.9_dbg/storage/innobase/include/trx0trx.h", line=line@entry=1115, function=function@entry=0x558b9314a778 "trx_mod_table_time_t* trx_t::check_bulk_buffer(dict_table_t*)") at assert.c:101
      #4  0x0000558b929fb227 in trx_t::check_bulk_buffer (table=<optimized out>, this=0x153d9dc331e0) at /test/10.9_dbg/storage/innobase/include/trx0trx.h:1115
      #5  row_ins_index_entry (thr=0x153d18074f00, entry=0x153d18023858, index=0x153d18072888) at /test/10.9_dbg/storage/innobase/row/row0ins.cc:3379
      #6  row_ins_index_entry_step (thr=0x153d18074f00, node=0x153d18074c08) at /test/10.9_dbg/storage/innobase/row/row0ins.cc:3556
      #7  row_ins (thr=0x153d18074f00, node=0x153d18074c08) at /test/10.9_dbg/storage/innobase/row/row0ins.cc:3702
      #8  row_ins_step (thr=thr@entry=0x153d18074f00) at /test/10.9_dbg/storage/innobase/row/row0ins.cc:3848
      #9  0x0000558b92a1f578 in row_insert_for_mysql (mysql_rec=mysql_rec@entry=0x153d180710d8 "\377\001", prebuilt=0x153d180745c8, ins_mode=ROW_INS_NORMAL) at /test/10.9_dbg/storage/innobase/row/row0mysql.cc:1318
      #10 0x0000558b928993c5 in ha_innobase::write_row (this=0x153d18073040, record=0x153d180710d8 "\377\001") at /test/10.9_dbg/storage/innobase/handler/ha_innodb.cc:7800
      #11 0x0000558b92837350 in ha_sequence::write_row (this=0x153d18071560, buf=0x153d180710d8 "\377\001") at /test/10.9_dbg/sql/ha_sequence.cc:223
      #12 0x0000558b924f2601 in handler::ha_write_row (this=0x153d18071560, buf=0x153d180710d8 "\377\001") at /test/10.9_dbg/sql/handler.cc:7527
      #13 0x0000558b9242a4ca in sequence_definition::write_initial_sequence (this=this@entry=0x153d180145c0, table=0x153d18070c88) at /test/10.9_dbg/sql/sql_sequence.cc:617
      #14 0x0000558b9242a6bf in sequence_insert (thd=thd@entry=0x153d18000db8, lex=0x153d180050f0, org_table_list=org_table_list@entry=0x153d18013ed8) at /test/10.9_dbg/sql/sql_sequence.cc:367
      #15 0x0000558b922c389a in mysql_create_table_no_lock (thd=thd@entry=0x153d18000db8, ddl_log_state_create=ddl_log_state_create@entry=0x153d88163920, ddl_log_state_rm=ddl_log_state_rm@entry=0x153d88163940, db=db@entry=0x153d18013ef0, table_name=table_name@entry=0x153d18013f00, create_info=create_info@entry=0x153d88163bc0, alter_info=0x153d88163ad0, is_trans=0x153d8816391f, create_table_mode=0, table_list=0x153d18013ed8) at /test/10.9_dbg/sql/sql_table.cc:4724
      #16 0x0000558b922c3c5e in mysql_create_table (thd=thd@entry=0x153d18000db8, create_table=create_table@entry=0x153d18013ed8, create_info=create_info@entry=0x153d88163bc0, alter_info=alter_info@entry=0x153d88163ad0) at /test/10.9_dbg/sql/sql_table.cc:4822
      #17 0x0000558b922c5b16 in Sql_cmd_create_table_like::execute (this=<optimized out>, thd=0x153d18000db8) at /test/10.9_dbg/sql/sql_table.cc:12325
      #18 0x0000558b921de930 in mysql_execute_command (thd=thd@entry=0x153d18000db8, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.9_dbg/sql/sql_parse.cc:5988
      #19 0x0000558b921c5437 in mysql_parse (thd=thd@entry=0x153d18000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x153d88164400) at /test/10.9_dbg/sql/sql_parse.cc:8027
      #20 0x0000558b921d40d3 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x153d18000db8, packet=packet@entry=0x153d1800b889 "CREATE TEMPORARY SEQUENCE s1", packet_length=packet_length@entry=28, blocking=blocking@entry=true) at /test/10.9_dbg/sql/sql_class.h:1362
      #21 0x0000558b921d751a in do_command (thd=0x153d18000db8, blocking=blocking@entry=true) at /test/10.9_dbg/sql/sql_parse.cc:1402
      #22 0x0000558b92352228 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x558b953407a8, put_in_cache=put_in_cache@entry=true) at /test/10.9_dbg/sql/sql_connect.cc:1418
      #23 0x0000558b9235282d in handle_one_connection (arg=arg@entry=0x558b953407a8) at /test/10.9_dbg/sql/sql_connect.cc:1312
      #24 0x0000558b927d8f23 in pfs_spawn_thread (arg=0x558b952539c8) at /test/10.9_dbg/storage/perfschema/pfs.cc:2201
      #25 0x0000153da730c609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #26 0x0000153da6ef8163 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.7.4 (dbg), 10.8.3 (dbg), 10.9.0 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.2.44 (dbg), 10.2.44 (opt), 10.3.35 (dbg), 10.3.35 (opt), 10.4.25 (dbg), 10.4.25 (opt), 10.5.16 (dbg), 10.5.16 (opt), 10.6.8 (dbg), 10.6.8 (opt), 10.7.4 (opt), 10.8.3 (opt), 10.9.0 (opt)
      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.37 (dbg), 5.7.37 (opt), 8.0.28 (dbg), 8.0.28 (opt)

      Attachments

        Issue Links

          Activity

            People

              thiru Thirunarayanan Balathandayuthapani
              Roel Roel Van de Paar
              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.