[MDEV-31680] Missing DBUG_RETURN or DBUG_VOID_RETURN macro in function "prepare_fk_prelocking_list" Created: 2023-07-13  Updated: 2023-11-28

Status: Open
Project: MariaDB Server
Component/s: Debug
Affects Version/s: 10.4, 10.5, 10.6, 10.9, 10.10, 10.11, 11.0
Fix Version/s: 10.4, 10.5, 10.6, 10.11, 11.0

Type: Bug Priority: Minor
Reporter: Elena Stepanova Assignee: Oleksandr Byelkin
Resolution: Unresolved Votes: 0
Labels: not-11.1+


 Description   

Note: This report is about missing DBUG_RETURN only! The diagnostics area assertion failure which happens in similar circumstances is reported separately, e.g. MDEV-30277. There can be other issues, please don't add those here.

--source include/have_innodb.inc
 
CREATE TABLE t (a INT, b INT, c INT, INDEX(b)) ENGINE=InnoDB;
PREPARE stmt FROM "UPDATE t SET c = 10 LIMIT ?";
ALTER TABLE t ADD FOREIGN KEY (a) REFERENCES t (b);
--error ER_INVALID_DEFAULT_PARAM
EXECUTE stmt USING DEFAULT;
 
# Cleanup
DROP TABLE t;

10.4 9856bb42

/bld/bin/mysqld: debugger aborting because missing DBUG_RETURN or DBUG_VOID_RETURN macro in function "prepare_fk_prelocking_list"
 
230713 18:42:20 [ERROR] mysqld got signal 6 ;
 
#7  0x00007f3219a45472 in __GI_abort () at ./stdlib/abort.c:79
#8  0x0000558ddc3b98ad in DbugExit (why=0x7f3204e64c70 "missing DBUG_RETURN or DBUG_VOID_RETURN macro in function \"prepare_fk_prelocking_list\"\n") at /data/src/10.4/dbug/dbug.c:2042
#9  0x0000558ddc3b58f3 in _db_return_ (_stack_frame_=0x7f3204e64fa0) at /data/src/10.4/dbug/dbug.c:1210
#10 0x0000558dda648259 in prepare_fk_prelocking_list (thd=0x62b00009a208, prelocking_ctx=0x62b0000d9240, table_list=0x62b0000daef8, need_prelocking=0x7f3204e65230, op=2 '\002') at /data/src/10.4/sql/sql_base.cc:4785
#11 0x0000558dda61e536 in DML_prelocking_strategy::handle_table (this=0x7f3204e65620, thd=0x62b00009a208, prelocking_ctx=0x62b0000d9240, table_list=0x62b0000daef8, need_prelocking=0x7f3204e65230) at /data/src/10.4/sql/sql_base.cc:4832
#12 0x0000558dda6180de in extend_table_list (thd=0x62b00009a208, tables=0x62b0000daef8, prelocking_strategy=0x7f3204e65620, has_prelocking_list=false) at /data/src/10.4/sql/sql_base.cc:3673
#13 0x0000558dda6198eb in open_and_process_table (thd=0x62b00009a208, tables=0x62b0000daef8, counter=0x7f3204e657b0, flags=0, prelocking_strategy=0x7f3204e65620, has_prelocking_list=false, ot_ctx=0x7f3204e65540) at /data/src/10.4/sql/sql_base.cc:3963
#14 0x0000558dda61c037 in open_tables (thd=0x62b00009a208, options=..., start=0x7f3204e658b0, counter=0x7f3204e657b0, flags=0, prelocking_strategy=0x7f3204e65620) at /data/src/10.4/sql/sql_base.cc:4390
#15 0x0000558dda5f1835 in open_tables (thd=0x62b00009a208, tables=0x7f3204e658b0, counter=0x7f3204e657b0, flags=0) at /data/src/10.4/sql/sql_base.h:473
#16 0x0000558ddaa6da09 in mysql_update (thd=0x62b00009a208, table_list=0x62b0000daef8, fields=..., values=..., conds=0x0, order_num=0, order=0x0, limit=0, ignore=false, found_return=0x7f3204e66220, updated_return=0x7f3204e66240) at /data/src/10.4/sql/sql_update.cc:411
#17 0x0000558dda7a55cc in mysql_execute_command (thd=0x62b00009a208) at /data/src/10.4/sql/sql_parse.cc:4449
#18 0x0000558dda811dfb in Prepared_statement::execute (this=0x6190000d8e88, expanded_query=0x7f3204e67b30, open_cursor=false) at /data/src/10.4/sql/sql_prepare.cc:5024
#19 0x0000558dda80d43b in Prepared_statement::execute_loop (this=0x6190000d8e88, expanded_query=0x7f3204e67b30, open_cursor=false, packet=0x0, packet_end=0x0) at /data/src/10.4/sql/sql_prepare.cc:4493
#20 0x0000558dda8072ad in mysql_sql_stmt_execute (thd=0x62b00009a208) at /data/src/10.4/sql/sql_prepare.cc:3577
#21 0x0000558dda7a2899 in mysql_execute_command (thd=0x62b00009a208) at /data/src/10.4/sql/sql_parse.cc:3992
#22 0x0000558dda7be517 in mysql_parse (thd=0x62b00009a208, rawbuf=0x62b0000a1228 "EXECUTE stmt USING DEFAULT", length=26, parser_state=0x7f3204e69860, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:8008
#23 0x0000558dda79485a in dispatch_command (command=COM_QUERY, thd=0x62b00009a208, packet=0x62900029e209 "EXECUTE stmt USING DEFAULT", packet_length=26, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1857
#24 0x0000558dda7913c9 in do_command (thd=0x62b00009a208) at /data/src/10.4/sql/sql_parse.cc:1378
#25 0x0000558ddab901c6 in do_handle_one_connection (connect=0x608000000ba8) at /data/src/10.4/sql/sql_connect.cc:1420
#26 0x0000558ddab8fadd in handle_one_connection (arg=0x608000000ba8) at /data/src/10.4/sql/sql_connect.cc:1324
#27 0x0000558ddb7fdf28 in pfs_spawn_thread (arg=0x615000006208) at /data/src/10.4/storage/perfschema/pfs.cc:1869
#28 0x00007f3219aa7fd4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#29 0x00007f3219b285bc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Reproducible on 10.4-11.0, also minor releases.
Not reproducible on 11.1.


Generated at Thu Feb 08 10:25:40 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.