mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
MDEV-15328: MariaDB 10.2.13 Crashes upon CALL PROCEDURE PARAM LAST_INSERT_ID ()
There is not current SELECT during assigning SP parameters, do not use it if current_select is empty.
This commit is contained in:
@ -2902,21 +2902,24 @@ public:
|
||||
{
|
||||
safe_to_cache_query= 0;
|
||||
|
||||
/*
|
||||
There are no sense to mark select_lex and union fields of LEX,
|
||||
but we should merk all subselects as uncacheable from current till
|
||||
most upper
|
||||
*/
|
||||
SELECT_LEX *sl;
|
||||
SELECT_LEX_UNIT *un;
|
||||
for (sl= current_select, un= sl->master_unit();
|
||||
un != &unit;
|
||||
sl= sl->outer_select(), un= sl->master_unit())
|
||||
if (current_select) // initialisation SP variables has no SELECT
|
||||
{
|
||||
sl->uncacheable|= cause;
|
||||
un->uncacheable|= cause;
|
||||
/*
|
||||
There are no sense to mark select_lex and union fields of LEX,
|
||||
but we should merk all subselects as uncacheable from current till
|
||||
most upper
|
||||
*/
|
||||
SELECT_LEX *sl;
|
||||
SELECT_LEX_UNIT *un;
|
||||
for (sl= current_select, un= sl->master_unit();
|
||||
un != &unit;
|
||||
sl= sl->outer_select(), un= sl->master_unit())
|
||||
{
|
||||
sl->uncacheable|= cause;
|
||||
un->uncacheable|= cause;
|
||||
}
|
||||
select_lex.uncacheable|= cause;
|
||||
}
|
||||
select_lex.uncacheable|= cause;
|
||||
}
|
||||
void set_trg_event_type_for_tables();
|
||||
|
||||
|
Reference in New Issue
Block a user