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

Assertion `trx->bulk_insert' failed in innodb_prepare_commit_versioned on SET autocommit=ON

    XMLWordPrintable

Details

    Description

      SET unique_checks=0,foreign_key_checks=0;
      CREATE TABLE t1 (c INT) ENGINE=InnoDB;
      CREATE TABLE t2 (c INT) ENGINE=InnoDB;
      SELECT 0 INTO OUTFILE 'a';
      SET autocommit=0;
      INSERT INTO t2 VALUES (0);
      LOAD DATA INFILE 'a' INTO TABLE t1;
      SET autocommit=ON;
      

      Leads to:

      11.0.1 b075191ba8598af6aff5549e6e19f6255aef258a (Debug)

      mysqld: /test/11.0_dbg/storage/innobase/handler/ha_innodb.cc:3710: ulonglong innodb_prepare_commit_versioned(THD*, ulonglong*): Assertion `trx->bulk_insert' failed.
      

      11.0.1 b075191ba8598af6aff5549e6e19f6255aef258a (Debug)

      Core was generated by `/test/MD090123-mariadb-11.0.1-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=22825471546944)
          at ./nptl/pthread_kill.c:44
      [Current thread is 1 (Thread 0x14c2781f9640 (LWP 4193991))]
      (gdb) bt
      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=22825471546944) at ./nptl/pthread_kill.c:44
      #1  __pthread_kill_internal (signo=6, threadid=22825471546944) at ./nptl/pthread_kill.c:78
      #2  __GI___pthread_kill (threadid=22825471546944, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
      #3  0x000014c29c8b3476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
      #4  0x000014c29c8997f3 in __GI_abort () at ./stdlib/abort.c:79
      #5  0x000014c29c89971b in __assert_fail_base (fmt=0x14c29ca4e150 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x56471fe0dcd4 "trx->bulk_insert", file=0x56471fe110d0 "/test/11.0_dbg/storage/innobase/handler/ha_innodb.cc", line=3710, function=<optimized out>) at ./assert/assert.c:92
      #6  0x000014c29c8aae96 in __GI___assert_fail (assertion=0x56471fe0dcd4 "trx->bulk_insert", file=0x56471fe110d0 "/test/11.0_dbg/storage/innobase/handler/ha_innodb.cc", line=3710, function=0x56471fe12148 "ulonglong innodb_prepare_commit_versioned(THD*, ulonglong*)") at ./assert/assert.c:101
      #7  0x000056471f74ecd7 in innodb_prepare_commit_versioned (thd=<optimized out>, trx_id=<optimized out>) at /test/11.0_dbg/storage/innobase/handler/ha_innodb.cc:3710
      #8  0x000056471f48ce08 in ha_commit_trans (thd=thd@entry=0x14c240000d58, all=all@entry=true) at /test/11.0_dbg/sql/handler.cc:1772
      #9  0x000056471f320138 in trans_commit (thd=thd@entry=0x14c240000d58) at /test/11.0_dbg/sql/transaction.cc:266
      #10 0x000056471f3230b2 in fix_autocommit (self=<optimized out>, thd=0x14c240000d58, type=<optimized out>) at /test/11.0_dbg/sql/sys_vars.cc:4494
      #11 0x000056471f0de794 in sys_var::update (this=0x5647205bd3c0 <Sys_autocommit>, thd=0x14c240000d58, var=0x14c240013248) at /test/11.0_dbg/sql/set_var.cc:213
      #12 0x000056471f0ded07 in set_var::update (this=<optimized out>, thd=<optimized out>) at /test/11.0_dbg/sql/set_var.cc:863
      #13 0x000056471f0dff30 in sql_set_variables (thd=thd@entry=0x14c240000d58, var_list=var_list@entry=0x14c240005ee8, free=free@entry=true) at /test/11.0_dbg/sql/set_var.cc:745
      #14 0x000056471f1ba543 in mysql_execute_command (thd=thd@entry=0x14c240000d58, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/11.0_dbg/sql/sql_parse.cc:5038
      #15 0x000056471f1be934 in mysql_parse (thd=thd@entry=0x14c240000d58, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14c2781f82c0) at /test/11.0_dbg/sql/sql_parse.cc:8000
      #16 0x000056471f1c0ac8 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14c240000d58, packet=packet@entry=0x14c24000ae09 "SET autocommit=ON", packet_length=packet_length@entry=17, blocking=blocking@entry=true) at /test/11.0_dbg/sql/sql_class.h:243
      #17 0x000056471f1c2921 in do_command (thd=0x14c240000d58, blocking=blocking@entry=true) at /test/11.0_dbg/sql/sql_parse.cc:1407
      #18 0x000056471f30c9ea in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5647231a1748, put_in_cache=put_in_cache@entry=true) at /test/11.0_dbg/sql/sql_connect.cc:1416
      #19 0x000056471f30cc4e in handle_one_connection (arg=0x5647231a1748) at /test/11.0_dbg/sql/sql_connect.cc:1318
      #20 0x000014c29c905b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #21 0x000014c29c997a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      Bug confirmed present in:
      MariaDB: 10.7.8 (dbg), 10.8.7 (dbg), 10.9.5 (dbg), 10.10.3 (dbg), 10.11.2 (dbg), 11.0.1 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.3.38 (dbg), 10.3.38 (opt), 10.4.28 (dbg), 10.4.28 (opt), 10.5.19 (dbg), 10.5.19 (opt), 10.6.12 (dbg), 10.6.12 (opt), 10.7.8 (opt), 10.8.7 (opt), 10.9.5 (opt), 10.10.3 (opt), 10.11.2 (opt), 11.0.1 (opt)
      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.40 (dbg), 5.7.40 (opt), 8.0.31 (dbg), 8.0.31 (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:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.