Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL), 10.11, 11.0(EOL), 11.1(EOL), 11.2(EOL)
-
None
Description
CREATE TABLE t(c INT); |
SELECT (SELECT 0 GROUP BY c HAVING (SELECT 0 GROUP BY c)) FROM t GROUP BY c ; |
Leads to:
10.9.2 bfdc4ff22ecf626eb46479e1a0dc1049d61a8d78 (Debug) |
mysqld: /test/10.9_dbg/sql/item.cc:5823: int Item_field::fix_outer_field(THD*, Field**, Item**): Assertion `*ref && (*ref)->fixed()' failed.
|
10.9.2 bfdc4ff22ecf626eb46479e1a0dc1049d61a8d78 (Debug) |
Core was generated by `/test/MD090822-mariadb-10.9.2-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
|
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 0x153bb976f700 (LWP 3588240))]
|
(gdb) bt
|
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
|
#1 0x0000153bd2112859 in __GI_abort () at abort.c:79
|
#2 0x0000153bd2112729 in __assert_fail_base (fmt=0x153bd22a8588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55d6b0e79f07 "*ref && (*ref)->fixed()", file=0x55d6b0e79b00 "/test/10.9_dbg/sql/item.cc", line=5823, function=<optimized out>) at assert.c:92
|
#3 0x0000153bd2123fd6 in __GI___assert_fail (assertion=assertion@entry=0x55d6b0e79f07 "*ref && (*ref)->fixed()", file=file@entry=0x55d6b0e79b00 "/test/10.9_dbg/sql/item.cc", line=line@entry=5823, function=function@entry=0x55d6b0e7c320 "int Item_field::fix_outer_field(THD*, Field**, Item**)") at assert.c:101
|
#4 0x000055d6b040de1c in Item_field::fix_outer_field (this=this@entry=0x153b84014d20, thd=thd@entry=0x153b84000db8, from_field=from_field@entry=0x153bb976d120, reference=reference@entry=0x153b84014e48) at /test/10.9_dbg/sql/item.h:1069
|
#5 0x000055d6b040ead8 in Item_field::fix_fields (this=0x153b84014d20, thd=0x153b84000db8, reference=0x153b84014e48) at /test/10.9_dbg/sql/item.cc:6121
|
#6 0x000055d6b0139671 in Item::fix_fields_if_needed (ref=<optimized out>, thd=0x153b84000db8, this=0x153b84014d20) at /test/10.9_dbg/sql/item.h:1156
|
#7 Item::fix_fields_if_needed_for_scalar (ref=<optimized out>, thd=0x153b84000db8, this=0x153b84014d20) at /test/10.9_dbg/sql/item.h:1148
|
#8 Item::fix_fields_if_needed_for_order_by (ref=<optimized out>, thd=0x153b84000db8, this=0x153b84014d20) at /test/10.9_dbg/sql/item.h:1156
|
#9 find_order_in_list (thd=thd@entry=0x153b84000db8, ref_pointer_array=<optimized out>, tables=tables@entry=0x0, order=order@entry=0x153b84014e38, fields=@0x153b84014ab0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x153b84014d08, last = 0x153b84014d08, elements = 1}, <No data fields>}, all_fields=@0x153b8406d410: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x153b84014d08, last = 0x153b84014d08, elements = 1}, <No data fields>}, is_group_field=true, add_to_all_fields=true, from_window_spec=false) at /test/10.9_dbg/sql/sql_select.cc:25204
|
#10 0x000055d6b01651b8 in setup_group (thd=thd@entry=0x153b84000db8, ref_pointer_array=<optimized out>, tables=tables@entry=0x0, fields=@0x153b84014ab0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x153b84014d08, last = 0x153b84014d08, elements = 1}, <No data fields>}, all_fields=@0x153b8406d410: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x153b84014d08, last = 0x153b84014d08, elements = 1}, <No data fields>}, order=0x153b84014e38, hidden_group_fields=0x153b8406d3bf, from_window_spec=false) at /test/10.9_dbg/sql/sql_select.cc:25328
|
#11 0x000055d6b01691b5 in setup_without_group (reserved=<optimized out>, hidden_group_fields=0x153b8406d3bf, win_funcs=<optimized out>, win_specs=<optimized out>, group=<optimized out>, order=<optimized out>, conds=0x153b8406d4f8, all_fields=@0x153b8406d410: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x153b84014d08, last = 0x153b84014d08, elements = 1}, <No data fields>}, fields=<optimized out>, leaves=<optimized out>, tables=<optimized out>, ref_pointer_array=<optimized out>, thd=<optimized out>) at /test/10.9_dbg/sql/sql_select.cc:886
|
#12 JOIN::prepare (this=0x153b8406d0b0, tables_init=<optimized out>, conds_init=<optimized out>, og_num=<optimized out>, order_init=<optimized out>, skip_order_by=skip_order_by@entry=false, group_init=<optimized out>, having_init=<optimized out>, proc_param_init=<optimized out>, select_lex_arg=<optimized out>, unit_arg=<optimized out>) at /test/10.9_dbg/sql/sql_select.cc:1454
|
#13 0x000055d6b04eeb81 in subselect_single_select_engine::prepare (this=0x153b84015828, thd=0x153b84000db8) at /test/10.9_dbg/sql/sql_lex.h:1362
|
#14 0x000055d6b04ee04f in Item_subselect::fix_fields (this=0x153b840156a0, thd_param=<optimized out>, ref=0x153b8406cb50) at /test/10.9_dbg/sql/item_subselect.cc:295
|
#15 0x000055d6b01697d4 in Item::fix_fields_if_needed (ref=0x153b8406cb50, thd=<optimized out>, this=0x153b840156a0) at /test/10.9_dbg/sql/item.h:1152
|
#16 Item::fix_fields_if_needed_for_scalar (ref=0x153b8406cb50, thd=<optimized out>, this=0x153b840156a0) at /test/10.9_dbg/sql/item.h:1148
|
#17 Item::fix_fields_if_needed_for_bool (ref=0x153b8406cb50, thd=<optimized out>, this=0x153b840156a0) at /test/10.9_dbg/sql/item.h:1152
|
#18 JOIN::prepare (this=0x153b8406c980, tables_init=<optimized out>, conds_init=<optimized out>, og_num=<optimized out>, order_init=<optimized out>, skip_order_by=skip_order_by@entry=false, group_init=<optimized out>, having_init=<optimized out>, proc_param_init=<optimized out>, select_lex_arg=<optimized out>, unit_arg=<optimized out>) at /test/10.9_dbg/sql/sql_select.cc:1512
|
#19 0x000055d6b04eeb81 in subselect_single_select_engine::prepare (this=0x153b84016200, thd=0x153b84000db8) at /test/10.9_dbg/sql/sql_lex.h:1362
|
#20 0x000055d6b04ee04f in Item_subselect::fix_fields (this=0x153b84016078, thd_param=<optimized out>, ref=0x153b84016248) at /test/10.9_dbg/sql/item_subselect.cc:295
|
#21 0x000055d6b0070ecc in Item::fix_fields_if_needed (ref=0x153b84016248, thd=0x153b84000db8, this=0x153b84016078) at /test/10.9_dbg/sql/item.h:1148
|
#22 Item::fix_fields_if_needed_for_scalar (ref=0x153b84016248, thd=0x153b84000db8, this=0x153b84016078) at /test/10.9_dbg/sql/item.h:1148
|
#23 setup_fields (thd=0x153b84000db8, ref_pointer_array=<optimized out>, fields=<optimized out>, column_usage=column_usage@entry=MARK_COLUMNS_READ, sum_func_list=sum_func_list@entry=0x153b84017868, pre_fix=0x153b84013fd0, allow_sum_func=true) at /test/10.9_dbg/sql/sql_base.cc:7975
|
#24 0x000055d6b0168c1a in JOIN::prepare (this=this@entry=0x153b84017508, tables_init=tables_init@entry=0x153b84016320, conds_init=conds_init@entry=0x0, og_num=og_num@entry=1, order_init=order_init@entry=0x0, skip_order_by=skip_order_by@entry=false, group_init=0x153b84016b40, having_init=0x0, proc_param_init=0x0, select_lex_arg=0x153b84013d18, unit_arg=0x153b84004fd8) at /test/10.9_dbg/sql/sql_select.cc:1448
|
#25 0x000055d6b0180022 in mysql_select (thd=thd@entry=0x153b84000db8, tables=0x153b84016320, fields=@0x153b84013fb8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x153b84016240, last = 0x153b84016240, elements = 1}, <No data fields>}, conds=0x0, og_num=1, order=0x0, group=0x153b84016b40, having=0x0, proc_param=0x0, select_options=2147748608, result=0x153b840174e0, unit=0x153b84004fd8, select_lex=0x153b84013d18) at /test/10.9_dbg/sql/sql_select.cc:5032
|
#26 0x000055d6b0180240 in handle_select (thd=thd@entry=0x153b84000db8, lex=lex@entry=0x153b84004f00, result=result@entry=0x153b840174e0, setup_tables_done_option=setup_tables_done_option@entry=0) at /test/10.9_dbg/sql/sql_select.cc:579
|
#27 0x000055d6b00ebf62 in execute_sqlcom_select (thd=thd@entry=0x153b84000db8, all_tables=0x153b84016320) at /test/10.9_dbg/sql/sql_parse.cc:6261
|
#28 0x000055d6b00f8258 in mysql_execute_command (thd=thd@entry=0x153b84000db8, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.9_dbg/sql/sql_parse.cc:3945
|
#29 0x000055d6b00e623e in mysql_parse (thd=thd@entry=0x153b84000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x153bb976e330) at /test/10.9_dbg/sql/sql_parse.cc:8037
|
#30 0x000055d6b00f380c in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x153b84000db8, packet=packet@entry=0x153b8400b6c9 "SELECT (SELECT 0 GROUP BY c HAVING (SELECT 0 GROUP BY c)) FROM t GROUP BY c", packet_length=packet_length@entry=75, blocking=blocking@entry=true) at /test/10.9_dbg/sql/sql_class.h:1364
|
#31 0x000055d6b00f5f14 in do_command (thd=0x153b84000db8, blocking=blocking@entry=true) at /test/10.9_dbg/sql/sql_parse.cc:1407
|
#32 0x000055d6b0255b68 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55d6b400cad8, put_in_cache=put_in_cache@entry=true) at /test/10.9_dbg/sql/sql_connect.cc:1418
|
#33 0x000055d6b0256071 in handle_one_connection (arg=0x55d6b400cad8) at /test/10.9_dbg/sql/sql_connect.cc:1312
|
#34 0x0000153bd2623609 in start_thread (arg=<optimized out>) at pthread_create.c:477
|
#35 0x0000153bd220f133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
|
Bug confirmed present in:
MariaDB: 10.4.26 (dbg), 10.5.17 (dbg), 10.6.9 (dbg), 10.7.5 (dbg), 10.8.4 (dbg), 10.9.2 (dbg), 10.10.0 (dbg)
Bug (or feature/syntax) confirmed not present in:
MariaDB: 10.3.36 (dbg), 10.3.36 (opt), 10.4.26 (opt), 10.5.17 (opt), 10.6.9 (opt), 10.7.5 (opt), 10.8.4 (opt), 10.9.2 (opt), 10.10.0 (opt)
Attachments
Issue Links
- is duplicated by
-
MDEV-31632 Server crashes in Item_field::fix_outer_field place= prev_subselect_item->parsing_place (prev_subselect_item=NULL)
- Closed
-
MDEV-32381 Segmentation fault at /mariadb-11.3.0/sql/item.cc:5669
- Closed
- relates to
-
MDEV-28506 SIGSEGV's in find_field_in_table[s][_ref], Item_field::fix_fields, create_view_field and MemcmpInterceptorCommon | Assertions `(*select_ref)->fixed' or '->is_fixed' and `table_list->table' failed
- Stalled
-
MDEV-29351 SIGSEGV when doing forward reference of item in select list
- Closed
-
MDEV-32297 pushed condition into context with empty table list crashes.
- In Progress