1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +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:
Oleksandr Byelkin
2020-08-11 16:37:48 +02:00
parent 571764c04f
commit 0f080dd60a
11 changed files with 601 additions and 30 deletions

View File

@ -1131,6 +1131,8 @@ JOIN::prepare(TABLE_LIST *tables_init,
proc_param= proc_param_init;
tables_list= tables_init;
select_lex= select_lex_arg;
DBUG_PRINT("info", ("select %p (%u) = JOIN %p",
select_lex, select_lex->select_number, this));
select_lex->join= this;
join_list= &select_lex->top_join_list;
union_part= unit_arg->is_unit_op();
@ -4494,6 +4496,9 @@ int
JOIN::destroy()
{
DBUG_ENTER("JOIN::destroy");
DBUG_PRINT("info", ("select %p (%u) <> JOIN %p",
select_lex, select_lex->select_number, this));
select_lex->join= 0;
cond_equal= 0;