Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Major
-
Resolution: Unresolved
-
11.4, 12.1(EOL), 11.8
-
None
-
Q1/2026 Server Maintenance
Description
The following script:
--source include/have_sequence.inc
|
set optimizer_switch='derived_merge=off';
|
CREATE TABLE t AS SELECT 1 AS a FROM seq_1_to_2;
|
SELECT md5(a) IN (SELECT * FROM (SELECT '' FROM t) as x) FROM t;
|
leads to assertion failure with the following stacktrace:
Program terminated with signal SIGABRT, Aborted.
|
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=6, no_tid=0) at ./nptl/pthread_kill.c:44
|
#1 __pthread_kill_internal (threadid=<optimized out>, signo=6) at ./nptl/pthread_kill.c:89
|
#2 __GI___pthread_kill (threadid=<optimized out>, signo=6) at ./nptl/pthread_kill.c:100
|
#3 0x000060e18ddff4b1 in my_write_core (sig=6) at /src/mariadb2/mysys/stacktrace.c:424
|
#4 0x000060e18d407288 in handle_fatal_signal (sig=6) at /src/mariadb2/sql/signal_handler.cc:298
|
#5 <signal handler called>
|
#6 __pthread_kill_implementation (threadid=<optimized out>, signo=6, no_tid=0) at ./nptl/pthread_kill.c:44
|
#7 __pthread_kill_internal (threadid=<optimized out>, signo=6) at ./nptl/pthread_kill.c:89
|
#8 __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ./nptl/pthread_kill.c:100
|
#9 0x00007e7d6904579e in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
|
#10 0x00007e7d690288cd in __GI_abort () at ./stdlib/abort.c:73
|
#11 0x00007e7d69028830 in __assert_fail_base (fmt=<optimized out>, assertion=<optimized out>, file=<optimized out>, line=<optimized out>, function=<optimized out>) at ./assert/assert.c:118
|
#12 0x000060e18d02880a in create_ref_for_key (join=0x7e7d5001d350, j=0x7e7d50071c38, org_keyuse=0x7e7d50075908, allow_full_scan=true, used_tables=4611686018427387905) at /src/mariadb2/sql/sql_select.cc:13686
|
#13 0x000060e18d027cc8 in JOIN::get_best_combination (this=0x7e7d5001d350) at /src/mariadb2/sql/sql_select.cc:13437
|
#14 0x000060e18d0069c0 in JOIN::optimize_stage2 (this=0x7e7d5001d350) at /src/mariadb2/sql/sql_select.cc:2772
|
#15 0x000060e18d0067c3 in JOIN::optimize_inner (this=0x7e7d5001d350) at /src/mariadb2/sql/sql_select.cc:2751
|
#16 0x000060e18d003a8b in JOIN::optimize (this=0x7e7d5001d350) at /src/mariadb2/sql/sql_select.cc:2006
|
#17 0x000060e18cf4b78a in st_select_lex::optimize_unflattened_subqueries (this=0x7e7d500182d8, const_only=false) at /src/mariadb2/sql/sql_lex.cc:5073
|
#18 0x000060e18d23643c in JOIN::optimize_unflattened_subqueries (this=0x7e7d5001ca00) at /src/mariadb2/sql/opt_subselect.cc:5907
|
#19 0x000060e18d008bb9 in JOIN::optimize_stage2 (this=0x7e7d5001ca00) at /src/mariadb2/sql/sql_select.cc:3344
|
#20 0x000060e18d0067c3 in JOIN::optimize_inner (this=0x7e7d5001ca00) at /src/mariadb2/sql/sql_select.cc:2751
|
#21 0x000060e18d003a8b in JOIN::optimize (this=0x7e7d5001ca00) at /src/mariadb2/sql/sql_select.cc:2006
|
#22 0x000060e18d0105bb in mysql_select (thd=0x7e7d50000dc8, tables=0x7e7d5001b8b0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2164525824, result=0x7e7d5001c9d8, unit=0x7e7d500053c0, select_lex=0x7e7d500182d8) at /src/mariadb2/sql/sql_select.cc:5370
|
#23 0x000060e18cffd590 in handle_select (thd=0x7e7d50000dc8, lex=0x7e7d500052e0, result=0x7e7d5001c9d8, setup_tables_done_option=0) at /src/mariadb2/sql/sql_select.cc:634
|
#24 0x000060e18cf9d0d7 in execute_sqlcom_select (thd=0x7e7d50000dc8, all_tables=0x7e7d5001b8b0) at /src/mariadb2/sql/sql_parse.cc:6166
|
#25 0x000060e18cf9488e in mysql_execute_command (thd=0x7e7d50000dc8, is_called_from_prepared_stmt=false) at /src/mariadb2/sql/sql_parse.cc:3954
|
#26 0x000060e18cfa22e8 in mysql_parse (thd=0x7e7d50000dc8, rawbuf=0x7e7d50018200 "SELECT md5(a) IN (SELECT * FROM (SELECT '' FROM t) as x) FROM t", length=63, parser_state=0x7e7d628e62c0) at /src/mariadb2/sql/sql_parse.cc:7882
|
#27 0x000060e18cf8db01 in dispatch_command (command=COM_QUERY, thd=0x7e7d50000dc8, packet=0x7e7d5000c159 "SELECT md5(a) IN (SELECT * FROM (SELECT '' FROM t) as x) FROM t", packet_length=63, blocking=true) at /src/mariadb2/sql/sql_parse.cc:1877
|
#28 0x000060e18cf8c3e6 in do_command (thd=0x7e7d50000dc8, blocking=true) at /src/mariadb2/sql/sql_parse.cc:1416
|
#29 0x000060e18d1a8826 in do_handle_one_connection (connect=0x60e1c6632278, put_in_cache=true) at /src/mariadb2/sql/sql_connect.cc:1414
|
#30 0x000060e18d1a859b in handle_one_connection (arg=0x60e1c660d1b8) at /src/mariadb2/sql/sql_connect.cc:1326
|
#31 0x000060e18d78a598 in pfs_spawn_thread (arg=0x60e1c66250c8) at /src/mariadb2/storage/perfschema/pfs.cc:2198
|
#32 0x00007e7d690a27f1 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:448
|
#33 0x00007e7d69133c9c in __GI___clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
|
Attachments
Issue Links
- relates to
-
MDEV-36900 [draft] Assertion `length > 0' failed in create_ref_for_key
-
- Open
-