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

Warning about assertion failure marked_for_write_or_computed() printed by release build with DBUG_ASSERT_AS_PRINTF, but no failure on debug build

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.4
    • Fix Version/s: 10.4.5
    • Component/s: Compiling, Debug
    • Labels:
      None

      Description

      CREATE TABLE t1 (n BLOB, UNIQUE(n));
      INSERT INTO t1 VALUES (1);
      DELETE FROM t1 WHERE n = 1;
       
      # Cleanup
      DROP TABLE t1;
      

      10.4 3e89e0f2 -DCMAKE_C_FLAGS="-DDBUG_ASSERT_AS_PRINTF" -DCMAKE_CXX_FLAGS="-DDBUG_ASSERT_AS_PRINTF" -DCMAKE_BUILD_TYPE=RelWithDebInfo

      Warning: assertion failed: marked_for_write_or_computed() at /data/src/10.4-bug/sql/field.cc line 4331
      Attempting backtrace to find out the reason for the assert:
      stack_bottom = 0x0 thread_stack 0x49000
      mysys/stacktrace.c:270(my_print_stacktrace)[0x5557736fa539]
      sql/field.cc:4334(Field_longlong::store(long long, bool))[0x5557731d273b]
      sql/item.cc:6493(Item::save_in_field(Field*, bool))[0x5557731feffc]
      sql/table.cc:8203(TABLE::update_virtual_fields(handler*, enum_vcol_update_mode))[0x55577308bf2a]
      sql/handler.cc:2997(handler::ha_rnd_next(unsigned char*))[0x5557731ee35b]b
      sql/records.cc:481(rr_sequential(READ_RECORD*))[0x555773310564]
      sql/sql_delete.cc:804(mysql_delete(THD*, TABLE_LIST*, Item*, SQL_I_List<st_order>*, unsigned long long, unsigned long long, select_result*))[0x555773326913]
      sql/sql_parse.cc:4985(mysql_execute_command(THD*))[0x555772fc7767]
      sql/sql_class.h:2359(THD::enter_stage(PSI_stage_info_v1 const*, char const*, char const*, unsigned int))[0x555772fcdd74]
      sql/sql_audit.h:168(mysql_audit_general)[0x555772fd1319]
      sql/sql_parse.cc:1366(do_command(THD*))[0x555772fd28e2]
      sql/sql_connect.cc:1398(do_handle_one_connection(CONNECT*))[0x5557730b641c]
      sql/sql_connect.cc:1303(handle_one_connection)[0x5557730b6584]
      perfschema/pfs.cc:1865(pfs_spawn_thread)[0x5557734141c4]
      nptl/pthread_create.c:333(start_thread)[0x7f793cf28494]
      x86_64/clone.S:99(clone)[0x7f793aef093f]
      

      The warning is produced twice upon execution of the test case above.

      No failure on debug or debug-ASAN builds.
      No failure with limited key length.
      Not applicable to 10.3 because of the unlimited key length.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                monty Michael Widenius
                Reporter:
                elenst Elena Stepanova
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: