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

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

    XMLWordPrintable

Details

    Description

      USE test;
      SET SQL_MODE='STRICT_TRANS_TABLES';
      CREATE TABLE t (a DOUBLE PRIMARY KEY AUTO_INCREMENT);
      INSERT INTO t VALUES (18446744073709551601);
      

      Leads to:

      10.5.5 30e7a0a866dce530d8328c6d614e48d39a264f9b

      mysqld: /test/10.5_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.5.5 30e7a0a866dce530d8328c6d614e48d39a264f9b

      Core was generated by `/test/MD140720-mariadb-10.5.5-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      [Current thread is 1 (Thread 0x152af4326700 (LWP 1746186))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      #1  0x000055ec783c24d7 in my_write_core (sig=sig@entry=6) at /test/10.5_dbg/mysys/stacktrace.c:518
      #2  0x000055ec77b7c9ba in handle_fatal_signal (sig=6) at /test/10.5_dbg/sql/signal_handler.cc:330
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
      #5  0x0000152af25bc8b1 in __GI_abort () at abort.c:79
      #6  0x0000152af25ac42a in __assert_fail_base (fmt=0x152af2733a38 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x55ec78538298 "!is_set() || (m_status == DA_OK_BULK && is_bulk_op())", file=file@entry=0x55ec78538240 "/test/10.5_dbg/sql/sql_error.cc", line=line@entry=335, function=function@entry=0x55ec78538dc0 <Diagnostics_area::set_ok_status(unsigned long long, unsigned long long, char const*)::__PRETTY_FUNCTION__> "void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*)") at assert.c:92
      #7  0x0000152af25ac4a2 in __GI___assert_fail (assertion=assertion@entry=0x55ec78538298 "!is_set() || (m_status == DA_OK_BULK && is_bulk_op())", file=file@entry=0x55ec78538240 "/test/10.5_dbg/sql/sql_error.cc", line=line@entry=335, function=function@entry=0x55ec78538dc0 <Diagnostics_area::set_ok_status(unsigned long long, unsigned long long, char const*)::__PRETTY_FUNCTION__> "void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*)") at assert.c:101
      #8  0x000055ec77886a13 in Diagnostics_area::set_ok_status (this=0x152ad001ab90, affected_rows=1, last_insert_id=last_insert_id@entry=9223372036854775807, message=message@entry=0x0) at /test/10.5_dbg/sql/sql_error.cc:335
      #9  0x000055ec7789babf in my_ok (message=0x0, id=9223372036854775807, affected_rows_arg=<optimized out>, thd=0x152ad0015088) at /test/10.5_dbg/sql/sql_class.h:5214
      #10 mysql_insert (thd=thd@entry=0x152ad0015088, table_list=<optimized out>, fields=@0x152ad0019f50: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55ec791135e0 <end_of_list>, last = 0x152ad0019f50, elements = 0}, <No data fields>}, values_list=@0x152ad0019f98: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x152ad0074dc8, last = 0x152ad0074dc8, elements = 1}, <No data fields>}, update_fields=@0x152ad0019f80: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55ec791135e0 <end_of_list>, last = 0x152ad0019f80, elements = 0}, <No data fields>}, update_values=@0x152ad0019f68: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55ec791135e0 <end_of_list>, last = 0x152ad0019f68, elements = 0}, <No data fields>}, duplic=DUP_ERROR, ignore=false, result=0x0) at /test/10.5_dbg/sql/sql_insert.cc:1277
      #11 0x000055ec778d2108 in mysql_execute_command (thd=thd@entry=0x152ad0015088) at /test/10.5_dbg/sql/sql_parse.cc:4545
      #12 0x000055ec778dd752 in mysql_parse (thd=thd@entry=0x152ad0015088, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x152af4325350, 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:7993
      #13 0x000055ec778ca204 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x152ad0015088, packet=packet@entry=0x152ad0067089 "INSERT INTO t VALUES (18446744073709551601)", packet_length=packet_length@entry=43, 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:1866
      #14 0x000055ec778c89de in do_command (thd=0x152ad0015088) at /test/10.5_dbg/sql/sql_parse.cc:1347
      #15 0x000055ec77a24c3b in do_handle_one_connection (connect=<optimized out>, connect@entry=0x152ad34c7808, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1411
      #16 0x000055ec77a25357 in handle_one_connection (arg=arg@entry=0x152ad34c7808) at /test/10.5_dbg/sql/sql_connect.cc:1313
      #17 0x000055ec77e88ca8 in pfs_spawn_thread (arg=0x152af1046508) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
      #18 0x0000152af329f6db in start_thread (arg=0x152af4326700) at pthread_create.c:463
      #19 0x0000152af269da3f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.1.46 (dbg), 10.2.33 (dbg), 10.3.24 (dbg), 10.4.14 (dbg), 10.5.5 (dbg)
      MySQL: 5.5.62 (dbg), 5.6.47 (dbg)

      Bug confirmed not present in:
      MariaDB: 10.1.46 (opt), 10.2.33 (opt), 10.3.24 (opt), 10.4.14 (opt), 10.5.5 (opt)
      MySQL: 5.5.62 (opt), 5.6.47 (opt), 5.7.29 (dbg), 5.7.29 (opt), 8.0.19 (dbg), 8.0.19 (opt)

      Attachments

        Activity

          People

            rucha174 Rucha Deodhar
            Roel Roel Van de Paar
            Votes:
            0 Vote for this issue
            Watchers:
            4 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.