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

Assertion failure in diagnostics area upon INSERT/UPDATE IGNORE and check with ER_DATA_OUT_OF_RANGE

    XMLWordPrintable

Details

    • Not for Release Notes
    • Q2/2026 Server Maintenance

    Description

      CREATE TABLE t (f INT, CHECK(COT(f)));
      --error ER_DATA_OUT_OF_RANGE
      INSERT IGNORE INTO t VALUES (0);
       
      DROP TABLE t;
      

      11.4 4d4f0ccea78102af5f396d4fdd33e196a85a276c

      mariadbd: /data/bld/11.4-asan-ubsan/sql/sql_error.cc:346: void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*): Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' failed.
      260306 21:23:43 [ERROR] /share8t/bld/11.4-asan-ubsan/sql/mariadbd got signal 6 ;
       
      #9  0x00007f8f55445395 in __assert_fail_base (fmt=0x7f8f555b9a90 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x557b3f946580 "!is_set() || (m_status == DA_OK_BULK && is_bulk_op())", file=file@entry=0x557b3f9476c0 "/data/bld/11.4-asan-ubsan/sql/sql_error.cc", line=line@entry=346, function=function@entry=0x557b3f9465e0 "void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*)") at ./assert/assert.c:92
      #10 0x00007f8f55453eb2 in __GI___assert_fail (assertion=0x557b3f946580 "!is_set() || (m_status == DA_OK_BULK && is_bulk_op())", file=0x557b3f9476c0 "/data/bld/11.4-asan-ubsan/sql/sql_error.cc", line=346, function=0x557b3f9465e0 "void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*)") at ./assert/assert.c:101
      #11 0x0000557b3bcea6bb in Diagnostics_area::set_ok_status (this=this@entry=0x62c0000b6398, affected_rows=affected_rows@entry=0, last_insert_id=last_insert_id@entry=0, message=message@entry=0x0) at /data/bld/11.4-asan-ubsan/sql/sql_error.cc:346
      #12 0x0000557b3bb0f0cc in my_ok (thd=thd@entry=0x62c0000b0218, affected_rows_arg=0, id=id@entry=0, message=message@entry=0x0) at /data/bld/11.4-asan-ubsan/sql/sql_class.h:6129
      #13 0x0000557b3bd6c650 in mysql_insert (thd=thd@entry=0x62c0000b0218, table_list=<optimized out>, fields=..., values_list=..., update_fields=..., update_values=..., duplic=<optimized out>, ignore=<optimized out>, result=<optimized out>) at /data/bld/11.4-asan-ubsan/sql/sql_insert.cc:1418
      #14 0x0000557b3befe2bc in mysql_execute_command (thd=thd@entry=0x62c0000b0218, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /data/bld/11.4-asan-ubsan/sql/sql_parse.cc:4517
      #15 0x0000557b3bf15e5b in mysql_parse (thd=thd@entry=0x62c0000b0218, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x7f8f4952bab0) at /data/bld/11.4-asan-ubsan/sql/sql_parse.cc:7945
      #16 0x0000557b3bf1f24b in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x62c0000b0218, packet=packet@entry=0x629000253219 "INSERT IGNORE INTO t VALUES (0)", packet_length=packet_length@entry=31, blocking=blocking@entry=true) at /data/bld/11.4-asan-ubsan/sql/sql_parse.cc:1925
      #17 0x0000557b3bf2c0f3 in do_command (thd=thd@entry=0x62c0000b0218, blocking=blocking@entry=true) at /data/bld/11.4-asan-ubsan/sql/sql_parse.cc:1433
      #18 0x0000557b3c757580 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x6080000039b8, put_in_cache=put_in_cache@entry=true) at /data/bld/11.4-asan-ubsan/sql/sql_connect.cc:1497
      #19 0x0000557b3c7586dd in handle_one_connection (arg=0x6080000039b8) at /data/bld/11.4-asan-ubsan/sql/sql_connect.cc:1409
      #20 0x0000557b3e1acf75 in pfs_spawn_thread (arg=0x617000005b98) at /data/bld/11.4-asan-ubsan/storage/perfschema/pfs.cc:2201
      #21 0x00007f8f554a81c4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #22 0x00007f8f5552885c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      Same with UPDATE IGNORE, with the corresponding difference in the stack trace.

      The non-debug error is ER_DATA_OUT_OF_RANGE, as indicated in the test case.

      The failure started happening after this commit in 11.3.1:

      commit 9e457cbe501ca8e6d0c3939653db67ad6fceed05
      Author: Daniel Black
      Date:   Thu Oct 12 12:53:55 2023 +1100
       
          MDEV-32439 INSERT IGNORE on constraints result in ERROR rather than warning
      

      Attachments

        Issue Links

          Activity

            People

              danblack Daniel Black
              elenst Elena Stepanova
              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.