Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Won't Fix
-
10.4(EOL)
-
None
Description
CREATE TABLE t (a INT); |
CREATE VIEW v AS SELECT 1 FROM t; |
EXPLAIN SELECT ROUND ((SELECT 1 FROM v)) FROM v GROUP BY ROUND ((SELECT 1 FROM v)); |
Leads to:
10.4.31 161ce045a71e306768d4609bdc35788fa5ea2a71 (Debug) |
mariadbd: /test/10.4_dbg/sql/sql_select.cc:27408: int JOIN::save_explain_data_intern(Explain_query*, bool, bool, bool, const char*): Assertion `!join->select_lex->master_unit()->derived || join->select_lex->master_unit()->derived->is_materialized_derived() || join->select_lex->master_unit()->derived->is_with_table()' failed.
|
10.4.31 161ce045a71e306768d4609bdc35788fa5ea2a71 (Debug) |
Core was generated by `/test/MD090823-mariadb-10.4.31-linux-x86_64-dbg/bin/mariadbd --no-defaults --co'.
|
Program terminated with signal SIGABRT, Aborted.
|
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
|
[Current thread is 1 (Thread 0x1460b01ec700 (LWP 1615655))]
|
(gdb) bt
|
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
|
#1 0x00001460c9327859 in __GI_abort () at abort.c:79
|
#2 0x00001460c9327729 in __assert_fail_base (fmt=0x1460c94bd588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x5571beba2ec0 "!join->select_lex->master_unit()->derived || join->select_lex->master_unit()->derived->is_materialized_derived() || join->select_lex->master_unit()->derived->is_with_table()", file=0x5571beba03f0 "/test/10.4_dbg/sql/sql_select.cc", line=27408, function=<optimized out>) at assert.c:92
|
#3 0x00001460c9338fd6 in __GI___assert_fail (assertion=assertion@entry=0x5571beba2ec0 "!join->select_lex->master_unit()->derived || join->select_lex->master_unit()->derived->is_materialized_derived() || join->select_lex->master_unit()->derived->is_with_table()", file=file@entry=0x5571beba03f0 "/test/10.4_dbg/sql/sql_select.cc", line=line@entry=27408, function=function@entry=0x5571beba2e38 "int JOIN::save_explain_data_intern(Explain_query*, bool, bool, bool, const char*)") at assert.c:101
|
#4 0x00005571bdffe5a3 in JOIN::save_explain_data_intern (this=this@entry=0x146060082470, output=0x146060035930, need_tmp_table_arg=need_tmp_table_arg@entry=false, need_order_arg=need_order_arg@entry=false, distinct_arg=distinct_arg@entry=false, message=0x0) at /test/10.4_dbg/sql/sql_lex.h:1321
|
#5 0x00005571bdfff5f7 in JOIN::save_explain_data (this=this@entry=0x146060082470, output=0x146060035930, can_overwrite=can_overwrite@entry=false, need_tmp_table=<optimized out>, need_order=<optimized out>, distinct=<optimized out>) at /test/10.4_dbg/sql/sql_select.cc:4346
|
#6 0x00005571bdfff7ff in JOIN::build_explain (this=this@entry=0x146060082470) at /test/10.4_dbg/sql/sql_select.cc:1660
|
#7 0x00005571be00a025 in JOIN::optimize (this=this@entry=0x146060082470) at /test/10.4_dbg/sql/sql_select.cc:1717
|
#8 0x00005571be00a930 in mysql_select (thd=thd@entry=0x146060000d28, tables=0x146060033ec0, wild_num=0, fields=@0x146060030ce0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14606002d538, last = 0x14606002d538, elements = 1}, <No data fields>}, conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=<optimized out>, result=0x1460600315f8, unit=0x14606002f0a8, select_lex=0x146060030b80) at /test/10.4_dbg/sql/sql_select.cc:4812
|
#9 0x00005571be00aebf in mysql_explain_union (thd=thd@entry=0x146060000d28, unit=unit@entry=0x14606002f0a8, result=result@entry=0x1460600315f8) at /test/10.4_dbg/sql/sql_select.cc:27707
|
#10 0x00005571be00afa0 in select_describe (join=join@entry=0x1460600353c0, need_tmp_table=<optimized out>, need_order=<optimized out>, distinct=<optimized out>, message=<optimized out>) at /test/10.4_dbg/sql/sql_select.cc:27661
|
#11 0x00005571be00c06b in JOIN::exec_inner (this=this@entry=0x1460600353c0) at /test/10.4_dbg/sql/sql_select.cc:4567
|
#12 0x00005571be00c268 in JOIN::exec (this=this@entry=0x1460600353c0) at /test/10.4_dbg/sql/sql_select.cc:4387
|
#13 0x00005571be00a981 in mysql_select (thd=thd@entry=0x146060000d28, tables=0x146060014390, wild_num=0, fields=@0x146060012728: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x1460600142f8, last = 0x1460600142f8, elements = 1}, <No data fields>}, conds=0x0, og_num=1, order=0x0, group=0x146060016310, having=0x0, proc_param=0x0, select_options=<optimized out>, result=0x1460600315f8, unit=0x146060004ac8, select_lex=0x1460600125c8) at /test/10.4_dbg/sql/sql_select.cc:4826
|
#14 0x00005571be00aebf in mysql_explain_union (thd=thd@entry=0x146060000d28, unit=unit@entry=0x146060004ac8, result=result@entry=0x1460600315f8) at /test/10.4_dbg/sql/sql_select.cc:27707
|
#15 0x00005571bdf86b26 in execute_sqlcom_select (thd=thd@entry=0x146060000d28, all_tables=0x146060014390) at /test/10.4_dbg/sql/sql_parse.cc:6412
|
#16 0x00005571bdf90cb1 in mysql_execute_command (thd=thd@entry=0x146060000d28) at /test/10.4_dbg/sql/sql_parse.cc:3976
|
#17 0x00005571bdf9b122 in mysql_parse (thd=thd@entry=0x146060000d28, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x1460b01eb3b0, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.4_dbg/sql/sql_parse.cc:8010
|
#18 0x00005571bdf9dc3d in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x146060000d28, packet=packet@entry=0x146060019509 "", packet_length=packet_length@entry=82, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.4_dbg/sql/sql_class.h:1231
|
#19 0x00005571bdfa0468 in do_command (thd=0x146060000d28) at /test/10.4_dbg/sql/sql_parse.cc:1378
|
#20 0x00005571be0bd1ef in do_handle_one_connection (connect=<optimized out>) at /test/10.4_dbg/sql/sql_connect.cc:1420
|
#21 0x00005571be0bd2ab in handle_one_connection (arg=<optimized out>) at /test/10.4_dbg/sql/sql_connect.cc:1324
|
#22 0x00001460c9838609 in start_thread (arg=<optimized out>) at pthread_create.c:477
|
#23 0x00001460c9424133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
|
Bug confirmed present in:
MariaDB: 10.4.31 (dbg)
Bug (or feature/syntax) confirmed not present in:
MariaDB: 10.4.31 (opt), 10.5.22 (dbg), 10.5.22 (opt), 10.6.15 (opt), 10.6.15 (dbg), 10.9.8 (dbg), 10.9.8 (opt), 10.10.6 (dbg), 10.10.6 (opt), 10.11.5 (dbg), 10.11.5 (opt), 11.0.3 (dbg), 11.0.3 (opt), 11.1.2 (dbg), 11.1.2 (opt), 11.2.0 (dbg), 11.2.0 (opt)