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

Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' failed on INSERT

    XMLWordPrintable

Details

    Description

      Potentially a non-fixed codepath/iteration of MDEV-28105?

      INSTALL PLUGIN Spider SONAME 'ha_spider.so';
      SET default_storage_engine=Spider;
      CREATE TABLE t (s INT AUTO_INCREMENT KEY) PARTITION BY LIST (s) (PARTITION p VALUES IN (1), PARTITION p2 VALUES IN (2), PARTITION p3 VALUES IN (3));
      PREPARE p FROM 'SHOW CREATE TABLE t;';
      SET AUTO_INCREMENT_INCREMENT=5,AUTO_INCREMENT_OFFSET=10;
      INSERT IGNORE INTO t VALUES();
      

      Leads to:

      CS e886c2ba02ac021c648f84aa8f910af4fb4fb4bb (Debug)

      mariadbd: /test/10.5_dbg/sql/sql_error.cc:348: void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*): Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' failed.
      

      CS e886c2ba02ac021c648f84aa8f910af4fb4fb4bb (Debug)

      Core was generated by `/test/MD090924-mariadb-10.5.27-linux-x86_64-dbg/bin/mariadbd --no-defaults --ma'.
      Program terminated with signal SIGABRT, Aborted.
      Download failed: Invalid argument.  Continuing without source file ./nptl/./nptl/pthread_kill.c.
      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
       
      [Current thread is 1 (LWP 2989133)]
      (gdb) bt
      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
      #1  __pthread_kill_internal (signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:78
      #2  __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6)at ./nptl/pthread_kill.c:89
      #3  0x000014f85c64526e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
      #4  0x000014f85c6288ff in __GI_abort () at ./stdlib/abort.c:79
      #5  0x000014f85c62881b in __assert_fail_base (fmt=0x14f85c7d01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x55a7e6d616c8 "!is_set() || (m_status == DA_OK_BULK && is_bulk_op())", file=file@entry=0x55a7e6d615a8 "/test/10.5_dbg/sql/sql_error.cc", line=line@entry=348, function=function@entry=0x55a7e6d61700 "void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*)") at ./assert/assert.c:94
      #6  0x000014f85c63b507 in __assert_fail (assertion=0x55a7e6d616c8 "!is_set() || (m_status == DA_OK_BULK && is_bulk_op())", file=0x55a7e6d615a8 "/test/10.5_dbg/sql/sql_error.cc", line=348, function=0x55a7e6d61700 "void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*)") at ./assert/assert.c:103
      #7  0x000055a7e6034c52 in Diagnostics_area::set_ok_status (this=0x14f7d4006a90, affected_rows=0, last_insert_id=last_insert_id@entry=0, message=message@entry=0x0)at /test/10.5_dbg/sql/sql_error.cc:348
      #8  0x000055a7e60480cd in my_ok (message=0x0, id=0, affected_rows_arg=<optimized out>, thd=0x14f7d4000d58)at /test/10.5_dbg/sql/sql_class.h:4234
      #9  mysql_insert (thd=thd@entry=0x14f7d4000d58, table_list=<optimized out>, fields=@0x14f7d4005e50: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55a7e7711530 <end_of_list>, last = 0x14f7d4005e50, elements = 0}, <No data fields>}, values_list=@0x14f7d4005e98: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14f7d4013b70, last = 0x14f7d4013b70, elements = 1}, <No data fields>}, update_fields=@0x14f7d4005e80: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55a7e7711530 <end_of_list>, last = 0x14f7d4005e80, elements = 0}, <No data fields>}, update_values=@0x14f7d4005e68: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55a7e7711530 <end_of_list>, last = 0x14f7d4005e68, elements = 0}, <No data fields>}, duplic=DUP_ERROR, ignore=true, result=0x0)at /test/10.5_dbg/sql/sql_insert.cc:1340
      #10 0x000055a7e6081997 in mysql_execute_command (thd=thd@entry=0x14f7d4000d58)at /test/10.5_dbg/sql/sql_parse.cc:4651
      #11 0x000055a7e6087cf1 in mysql_parse (thd=thd@entry=0x14f7d4000d58, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14f8559b32b0, 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:8236
      #12 0x000055a7e608a39c in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14f7d4000d58, packet=packet@entry=0x14f7d400aaf9 "INSERT IGNORE INTO t VALUES()", packet_length=packet_length@entry=29, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false)at /test/10.5_dbg/sql/sql_class.h:238
      #13 0x000055a7e608ca8d in do_command (thd=0x14f7d4000d58)at /test/10.5_dbg/sql/sql_parse.cc:1376
      #14 0x000055a7e61c5d12 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55a7ea06baf8, put_in_cache=put_in_cache@entry=true)at /test/10.5_dbg/sql/sql_connect.cc:1417
      #15 0x000055a7e61c6042 in handle_one_connection (arg=arg@entry=0x55a7ea06baf8)at /test/10.5_dbg/sql/sql_connect.cc:1319
      #16 0x000055a7e660895a in pfs_spawn_thread (arg=0x55a7e9584ce8)at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
      #17 0x000014f85c69ca94 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
      #18 0x000014f85c729c3c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
      

      Bug confirmed present in:
      MariaDB: 10.5.27 (dbg), 10.6.20 (dbg), 10.11.10 (dbg), 11.2.6 (dbg), 11.4.4 (dbg), 11.6.2 (dbg), 11.7.0 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.5.27 (opt), 10.6.20 (opt), 10.11.10 (opt), 11.2.6 (opt), 11.4.4 (opt), 11.6.2 (opt), 11.7.0 (opt)

      Attachments

        Issue Links

          Activity

            People

              ycp Yuchen Pei
              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.