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

Spider: @@insert_id 128 to TINYINT: Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' failed.

    XMLWordPrintable

    Details

      Description

      INSTALL PLUGIN spider SONAME 'ha_spider.so';
      SET @@insert_id=128;  # 127 does not crash
      CREATE TABLE t(c TINYINT AUTO_INCREMENT KEY) ENGINE=Spider;
      INSERT IGNORE INTO t VALUES(0);
      

      Leads to:

      10.9.0 5be92887c2caacb45af87b1131db952ce627e83a (Debug)

      mysqld: /test/10.9_dbg/sql/sql_error.cc:335: void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*): Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' 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 0x14f95419e700 (LWP 770235))]
      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x000014f974617859 in __GI_abort () at abort.c:79
      #2  0x000014f974617729 in __assert_fail_base (fmt=0x14f9747ad588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55d8ea360e38 "!is_set() || (m_status == DA_OK_BULK && is_bulk_op())", file=0x55d8ea360d18 "/test/10.9_dbg/sql/sql_error.cc", line=335, function=<optimized out>) at assert.c:92
      #3  0x000014f974629006 in __GI___assert_fail (assertion=assertion@entry=0x55d8ea360e38 "!is_set() || (m_status == DA_OK_BULK && is_bulk_op())", file=file@entry=0x55d8ea360d18 "/test/10.9_dbg/sql/sql_error.cc", line=line@entry=335, function=function@entry=0x55d8ea360e70 "void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*)") at assert.c:101
      #4  0x000055d8e9637cdd in Diagnostics_area::set_ok_status (this=0x14f90c006d20, affected_rows=0, last_insert_id=last_insert_id@entry=0, message=message@entry=0x0) at /test/10.9_dbg/sql/sql_error.h:1031
      #5  0x000055d8e964dee2 in my_ok (message=0x0, id=0, affected_rows_arg=<optimized out>, thd=0x14f90c000db8) at /test/10.9_dbg/sql/sql_class.h:5531
      #6  mysql_insert (thd=thd@entry=0x14f90c000db8, table_list=0x14f90c013ec0, fields=@0x14f90c006080: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55d8eace49a0 <end_of_list>, last = 0x14f90c006080, elements = 0}, <No data fields>}, values_list=@0x14f90c0060c8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14f90c014ac8, last = 0x14f90c014ac8, elements = 1}, <No data fields>}, update_fields=@0x14f90c0060b0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55d8eace49a0 <end_of_list>, last = 0x14f90c0060b0, elements = 0}, <No data fields>}, update_values=@0x14f90c006098: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55d8eace49a0 <end_of_list>, last = 0x14f90c006098, elements = 0}, <No data fields>}, duplic=DUP_ERROR, ignore=true, result=0x0) at /test/10.9_dbg/sql/sql_insert.cc:1322
      #7  0x000055d8e9693a4c in mysql_execute_command (thd=thd@entry=0x14f90c000db8, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.9_dbg/sql/sql_parse.cc:4562
      #8  0x000055d8e967e437 in mysql_parse (thd=thd@entry=0x14f90c000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14f95419d400) at /test/10.9_dbg/sql/sql_parse.cc:8027
      #9  0x000055d8e968d0d3 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14f90c000db8, packet=packet@entry=0x14f90c00b889 "INSERT IGNORE INTO t VALUES(0)", packet_length=packet_length@entry=30, blocking=blocking@entry=true) at /test/10.9_dbg/sql/sql_class.h:1362
      #10 0x000055d8e969051a in do_command (thd=0x14f90c000db8, blocking=blocking@entry=true) at /test/10.9_dbg/sql/sql_parse.cc:1402
      #11 0x000055d8e980b228 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55d8ed87bf58, put_in_cache=put_in_cache@entry=true) at /test/10.9_dbg/sql/sql_connect.cc:1418
      #12 0x000055d8e980b82d in handle_one_connection (arg=arg@entry=0x55d8ed87bf58) at /test/10.9_dbg/sql/sql_connect.cc:1312
      #13 0x000055d8e9c91f23 in pfs_spawn_thread (arg=0x55d8ed7be9d8) at /test/10.9_dbg/storage/perfschema/pfs.cc:2201
      #14 0x000014f974b28609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #15 0x000014f974714163 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

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

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.4.25 (opt), 10.5.16 (opt), 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)

      May also affect 10.2/10.3

        Attachments

          Activity

            People

            Assignee:
            nayuta-yanagisawa Nayuta Yanagisawa
            Reporter:
            Roel Roel Van de Paar
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.