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

Assertion `trx->bulk_insert' failed in innodb_prepare_commit_versioned

    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;
      CREATE TRIGGER tr AFTER INSERT ON t1 FOR EACH ROW UPDATE t2 SET c=1;
      SET autocommit=1;
      INSERT INTO t1 VALUES (0);
      

      Leads to:

      10.9.0 4a2a9c02cd6611ef36bbb735c2b483dbc83580d4 (Debug)

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

      10.9.0 4a2a9c02cd6611ef36bbb735c2b483dbc83580d4 (Debug)

      Core was generated by `/test/MD260222-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 0x153fbc06a700 (LWP 907402))]
      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x0000153fc4cc8859 in __GI_abort () at abort.c:79
      #2  0x0000153fc4cc8729 in __assert_fail_base (fmt=0x153fc4e5e588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x559f940484bd "trx->bulk_insert", file=0x559f9404b418 "/test/10.9_dbg/storage/innobase/handler/ha_innodb.cc", line=3730, function=<optimized out>) at assert.c:92
      #3  0x0000153fc4cda006 in __GI___assert_fail (assertion=assertion@entry=0x559f940484bd "trx->bulk_insert", file=file@entry=0x559f9404b418 "/test/10.9_dbg/storage/innobase/handler/ha_innodb.cc", line=line@entry=3730, function=function@entry=0x559f9404c0a8 "ulonglong innodb_prepare_commit_versioned(THD*, ulonglong*)") at assert.c:101
      #4  0x0000559f937b9795 in innodb_prepare_commit_versioned (thd=<optimized out>, trx_id=<optimized out>) at /test/10.9_dbg/storage/innobase/handler/ha_innodb.cc:3730
      #5  0x0000559f9343992e in ha_commit_trans (thd=thd@entry=0x153f5c000db8, all=all@entry=false) at /test/10.9_dbg/sql/handler.h:2022
      #6  0x0000559f932aac38 in trans_commit_stmt (thd=thd@entry=0x153f5c000db8) at /test/10.9_dbg/sql/transaction.cc:472
      #7  0x0000559f931211be in mysql_execute_command (thd=thd@entry=0x153f5c000db8, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.9_dbg/sql/sql_parse.cc:6048
      #8  0x0000559f93107343 in mysql_parse (thd=thd@entry=0x153f5c000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x153fbc069400) at /test/10.9_dbg/sql/sql_parse.cc:8027
      #9  0x0000559f93115fdf in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x153f5c000db8, packet=packet@entry=0x153f5c00b889 "INSERT INTO t1 VALUES (0)", packet_length=packet_length@entry=25, blocking=blocking@entry=true) at /test/10.9_dbg/sql/sql_class.h:1362
      #10 0x0000559f93119426 in do_command (thd=0x153f5c000db8, blocking=blocking@entry=true) at /test/10.9_dbg/sql/sql_parse.cc:1402
      #11 0x0000559f93294036 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x559f95c3b098, put_in_cache=put_in_cache@entry=true) at /test/10.9_dbg/sql/sql_connect.cc:1418
      #12 0x0000559f9329463b in handle_one_connection (arg=arg@entry=0x559f95c3b098) at /test/10.9_dbg/sql/sql_connect.cc:1312
      #13 0x0000559f9371ad23 in pfs_spawn_thread (arg=0x559f95b7db18) at /test/10.9_dbg/storage/perfschema/pfs.cc:2201
      #14 0x0000153fc51d9609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #15 0x0000153fc4dc5163 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

              Assignee:
              thiru Thirunarayanan Balathandayuthapani
              Reporter:
              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.