Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL), 10.11
Description
On second select, server crashes.
Attachments
Issue Links
- is caused by
-
MDEV-25631 Crash executing query with VIEW, aggregate and subquery
-
- Closed
-
- relates to
-
MDEV-31296 Crash in Item_func::fix_fields when prepared statement with subqueries and window function is executed with sql_mode = ONLY_FULL_GROUP_BY
-
- Closed
-
10.6-fdc582fd983206ef9da531cc3e617fbf4db324d6
Thread 19 "mysqld" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f8c4451d640 (LWP 152304)]
0x0000000000d31d3c in Item_field::fix_fields (this=0x7f8ba003eab0, thd=0x7f8ba0000dc8, reference=0x7f8ba003eec8) at /home/dan/repos/mariadb-server-10.6/sql/item.cc:6117
6117 thd->lex == select->parent_lex &&
(gdb) bt
#0 0x0000000000d31d3c in Item_field::fix_fields (this=0x7f8ba003eab0, thd=0x7f8ba0000dc8, reference=0x7f8ba003eec8) at /home/dan/repos/mariadb-server-10.6/sql/item.cc:6117
...>
(gdb) info locals
table_list = 0x7f8ba003cc18
from_field = 0x7f8ba0037af8
outer_fixed = false
select = 0x0
(gdb) list
6112 goto mark_non_agg_field;
6113 }
6114
6115 if (!thd->lex->current_select->no_wrap_view_item &&
6116 thd->lex->in_sum_func &&
6117 thd->lex == select->parent_lex &&
6118 thd->lex->in_sum_func->nest_level ==
6119 select->nest_level)
6120 set_if_bigger(thd->lex->in_sum_func->max_arg_level,
6121 select->nest_level);
(gdb) p *context
$3 = {<Sql_alloc> = {<No data fields>}, outer_context = 0x0, table_list = 0x0, first_name_resolution_table = 0x7f8ba003cc18, last_name_resolution_table = 0x7f8ba003cc18, natural_join_first_table = 0x0, select_lex = 0x0, error_processor = 0xd41f40 <dummy_error_processor(THD*, void*)>, error_processor_data = 0x0, resolve_in_select_list = false, ignored_tables = 0x0, security_ctx = 0x0}
select is context->select_lex.