[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 Created: 2019-04-15  Updated: 2019-04-19  Resolved: 2019-04-19

Status: Closed
Project: MariaDB Server
Component/s: Compiling, Debug
Affects Version/s: 10.4
Fix Version/s: 10.4.5

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Michael Widenius
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-371 Unique indexes for blobs Closed

 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.



 Comments   
Comment by Michael Widenius [ 2019-04-19 ]

Problem was that DBUG_FIX_WRITE_SET was not enabled when using DBUG_ASSERT_AS_PRINTF

Generated at Thu Feb 08 08:50:12 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.