Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.5, 10.6, 10.11, 11.4, 11.8, 12.0
-
None
Description
CREATE TABLE t1 (a BIGINT); |
INSERT INTO t1 VALUES (1),(2); # Optional |
CREATE TABLE t2 (b INT PRIMARY KEY); |
INSERT INTO t2 VALUES (3),(4); |
CREATE TABLE t3 (c INT); |
INSERT INTO t3 VALUES (5); # Optional; can also be 2 rows, but then we need "LIMIT 1" in the subquery to keep it valid |
|
SELECT t1.* FROM t1 LEFT JOIN t2 ON (t2.b = t1.a) WHERE t1.a = (SELECT c FROM t3); |
|
DROP TABLE t1, t2, t3; |
10.11 a524ec5951d68cec7ef6228093ea1b1993a3243c |
mariadbd: /data/bld/10.11-asan/sql/item_subselect.cc:791: virtual bool Item_subselect::exec(): Assertion `!eliminated' failed.
|
250416 3:10:25 [ERROR] /share8t/bld/10.11-asan/sql/mariadbd got signal 6 ;
|
|
#9 0x00007f525b453eb2 in __GI___assert_fail (assertion=0x561c034afdc0 "!eliminated", file=0x561c034af520 "/data/bld/10.11-asan/sql/item_subselect.cc", line=791, function=0x561c034afd20 "virtual bool Item_subselect::exec()") at ./assert/assert.c:101
|
#10 0x0000561c017dedfc in Item_subselect::exec (this=0x62d00005def8) at /data/bld/10.11-asan/sql/item_subselect.cc:791
|
#11 0x0000561c017e5164 in Item_singlerow_subselect::val_int (this=0x62d00005def8) at /data/bld/10.11-asan/sql/item_subselect.cc:1485
|
#12 0x0000561c0160f6ec in Arg_comparator::compare_int_signed (this=0x62d00026f6f8) at /data/bld/10.11-asan/sql/item_cmpfunc.cc:995
|
#13 0x0000561c0165054e in Arg_comparator::compare (this=0x62d00026f6f8) at /data/bld/10.11-asan/sql/item_cmpfunc.h:117
|
#14 0x0000561c01618f88 in Item_func_eq::val_bool (this=0x62d00026f648) at /data/bld/10.11-asan/sql/item_cmpfunc.cc:1845
|
#15 0x0000561c00ddbbcd in evaluate_join_record (join=0x62d00005ecb0, join_tab=0x62d00026e8a0, error=0) at /data/bld/10.11-asan/sql/sql_select.cc:23102
|
#16 0x0000561c00ddaec0 in sub_select (join=0x62d00005ecb0, join_tab=0x62d00026e8a0, end_of_records=false) at /data/bld/10.11-asan/sql/sql_select.cc:23004
|
#17 0x0000561c00dd8c76 in do_select (join=0x62d00005ecb0, procedure=0x0) at /data/bld/10.11-asan/sql/sql_select.cc:22527
|
#18 0x0000561c00d5bae4 in JOIN::exec_inner (this=0x62d00005ecb0) at /data/bld/10.11-asan/sql/sql_select.cc:4974
|
#19 0x0000561c00d58f9c in JOIN::exec (this=0x62d00005ecb0) at /data/bld/10.11-asan/sql/sql_select.cc:4752
|
#20 0x0000561c00d5d437 in mysql_select (thd=0x62c0000b0218, tables=0x62d00005abd0, fields=..., conds=0x62d00005e0d8, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2164525824, result=0x62d00005ec80, unit=0x62c0000b46d8, select_lex=0x62d00005a548) at /data/bld/10.11-asan/sql/sql_select.cc:5232
|
#21 0x0000561c00d2bdf2 in handle_select (thd=0x62c0000b0218, lex=0x62c0000b4600, result=0x62d00005ec80, setup_tables_done_option=0) at /data/bld/10.11-asan/sql/sql_select.cc:600
|
#22 0x0000561c00c4f9b8 in execute_sqlcom_select (thd=0x62c0000b0218, all_tables=0x62d00005abd0) at /data/bld/10.11-asan/sql/sql_parse.cc:6426
|
#23 0x0000561c00c3d9af in mysql_execute_command (thd=0x62c0000b0218, is_called_from_prepared_stmt=false) at /data/bld/10.11-asan/sql/sql_parse.cc:4012
|
#24 0x0000561c00c5a2d6 in mysql_parse (thd=0x62c0000b0218, rawbuf=0x62d00005a438 "SELECT t1.* FROM t1 LEFT JOIN t2 ON (t2.b = t1.a) WHERE t1.a = (SELECT c FROM t3)", length=81, parser_state=0x7f5251cb5a80) at /data/bld/10.11-asan/sql/sql_parse.cc:8188
|
#25 0x0000561c00c2f90e in dispatch_command (command=COM_QUERY, thd=0x62c0000b0218, packet=0x62900024e219 "", packet_length=81, blocking=true) at /data/bld/10.11-asan/sql/sql_parse.cc:1905
|
#26 0x0000561c00c2c63b in do_command (thd=0x62c0000b0218, blocking=true) at /data/bld/10.11-asan/sql/sql_parse.cc:1418
|
#27 0x0000561c010f80d7 in do_handle_one_connection (connect=0x608000003b38, put_in_cache=true) at /data/bld/10.11-asan/sql/sql_connect.cc:1386
|
#28 0x0000561c010f7c36 in handle_one_connection (arg=0x608000003ab8) at /data/bld/10.11-asan/sql/sql_connect.cc:1298
|
#29 0x0000561c01d28d8c in pfs_spawn_thread (arg=0x617000005b98) at /data/bld/10.11-asan/storage/perfschema/pfs.cc:2201
|
#30 0x00007f525b4a81c4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
|
#31 0x00007f525b52885c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
|
plan |
EXPLAIN EXTENDED SELECT t1.* FROM t1 LEFT JOIN t2 ON (t2.b = t1.a) WHERE t1.a = (SELECT c FROM t3);
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 Using where
|
Warnings:
|
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = (/* select#2 */ select 5 from dual)
|
Reproducible on all existing versions, at least with MyISAM, InnoDB, Aria.
No obvious immediate problem on a non-debug build.
Attachments
Issue Links
- relates to
-
MDEV-29411 SIGSEGV's st_select_lex_unit::set_limit and st_select_lex::get_offset, and Assertion `!eliminated' failed in Item_subselect::exec on SELECT, UBSAN: member access within null pointer of type 'struct st_select_lex' in st_select_lex_unit::set_limit
-
- Closed
-