mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-23094: Multiple calls to a Stored Procedure from another Stored Procedure crashes server
Added system-SELECT to IF/WHILE/REPET/FOR for correct subqueries connecting. Added control of system/usual selects for correct error detection.
This commit is contained in:
@ -2428,6 +2428,7 @@ void st_select_lex::init_query()
|
||||
changed_elements= 0;
|
||||
first_natural_join_processing= 1;
|
||||
first_cond_optimization= 1;
|
||||
is_service_select= 0;
|
||||
parsing_place= NO_MATTER;
|
||||
save_parsing_place= NO_MATTER;
|
||||
exclude_from_table_unique_test= no_wrap_view_item= FALSE;
|
||||
@ -7614,7 +7615,7 @@ Item *LEX::create_item_ident_sp(THD *thd, Lex_ident_sys_st *name,
|
||||
return new (thd->mem_root) Item_func_sqlerrm(thd);
|
||||
}
|
||||
|
||||
if (!select_stack_head() &&
|
||||
if (fields_are_impossible() &&
|
||||
(current_select->parsing_place != FOR_LOOP_BOUND ||
|
||||
spcont->find_cursor(name, &unused_off, false) == NULL))
|
||||
{
|
||||
@ -8940,11 +8941,12 @@ void st_select_lex::add_statistics(SELECT_LEX_UNIT *unit)
|
||||
}
|
||||
|
||||
|
||||
bool LEX::main_select_push()
|
||||
bool LEX::main_select_push(bool service)
|
||||
{
|
||||
DBUG_ENTER("LEX::main_select_push");
|
||||
current_select_number= 1;
|
||||
builtin_select.select_number= 1;
|
||||
builtin_select.is_service_select= service;
|
||||
if (push_select(&builtin_select))
|
||||
DBUG_RETURN(TRUE);
|
||||
DBUG_RETURN(FALSE);
|
||||
|
Reference in New Issue
Block a user