mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-13907 compoind.test fails in build-bot for bb-10.2-ext
This commit is contained in:
@ -6287,15 +6287,17 @@ Item *LEX::create_and_link_Item_trigger_field(THD *thd,
|
||||
|
||||
|
||||
Item_param *LEX::add_placeholder(THD *thd, const LEX_CSTRING *name,
|
||||
uint pos_in_query, uint len_in_query)
|
||||
const char *start, const char *end)
|
||||
{
|
||||
if (!parsing_options.allows_variable)
|
||||
{
|
||||
my_error(ER_VIEW_SELECT_VARIABLE, MYF(0));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Query_fragment pos(thd, sphead, start, end);
|
||||
Item_param *item= new (thd->mem_root) Item_param(thd, name,
|
||||
pos_in_query, len_in_query);
|
||||
pos.pos(), pos.length());
|
||||
if (!item || param_list.push_back(item, thd->mem_root))
|
||||
{
|
||||
my_error(ER_OUT_OF_RESOURCES, MYF(0));
|
||||
@ -6305,12 +6307,6 @@ Item_param *LEX::add_placeholder(THD *thd, const LEX_CSTRING *name,
|
||||
}
|
||||
|
||||
|
||||
const char *LEX::substatement_query(THD *thd) const
|
||||
{
|
||||
return sphead ? sphead->m_tmp_query : thd->query();
|
||||
}
|
||||
|
||||
|
||||
bool LEX::add_signal_statement(THD *thd, const sp_condition_value *v)
|
||||
{
|
||||
Yacc_state *state= &thd->m_parser_state->m_yacc;
|
||||
@ -6364,8 +6360,8 @@ Item_splocal *LEX::create_item_spvar_row_field(THD *thd,
|
||||
const LEX_CSTRING *a,
|
||||
const LEX_CSTRING *b,
|
||||
sp_variable *spv,
|
||||
uint pos_in_q,
|
||||
uint length_in_q)
|
||||
const char *start,
|
||||
const char *end)
|
||||
{
|
||||
if (!parsing_options.allows_variable)
|
||||
{
|
||||
@ -6373,6 +6369,7 @@ Item_splocal *LEX::create_item_spvar_row_field(THD *thd,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Query_fragment pos(thd, sphead, start, end);
|
||||
Item_splocal *item;
|
||||
if (spv->field_def.is_table_rowtype_ref() ||
|
||||
spv->field_def.is_cursor_rowtype_ref())
|
||||
@ -6380,7 +6377,7 @@ Item_splocal *LEX::create_item_spvar_row_field(THD *thd,
|
||||
if (!(item= new (thd->mem_root)
|
||||
Item_splocal_row_field_by_name(thd, a, b, spv->offset,
|
||||
MYSQL_TYPE_NULL,
|
||||
pos_in_q, length_in_q)))
|
||||
pos.pos(), pos.length())))
|
||||
return NULL;
|
||||
}
|
||||
else
|
||||
@ -6394,7 +6391,7 @@ Item_splocal *LEX::create_item_spvar_row_field(THD *thd,
|
||||
Item_splocal_row_field(thd, a, b,
|
||||
spv->offset, row_field_offset,
|
||||
def->real_field_type(),
|
||||
pos_in_q, length_in_q)))
|
||||
pos.pos(), pos.length())))
|
||||
return NULL;
|
||||
}
|
||||
#ifndef DBUG_OFF
|
||||
@ -6489,14 +6486,14 @@ Item *LEX::create_item_func_setval(THD *thd, Table_ident *table_ident,
|
||||
Item *LEX::create_item_ident(THD *thd,
|
||||
const LEX_CSTRING *a,
|
||||
const LEX_CSTRING *b,
|
||||
uint pos_in_q, uint length_in_q)
|
||||
const char *start, const char *end)
|
||||
{
|
||||
sp_variable *spv;
|
||||
if (spcont && (spv= spcont->find_variable(a, false)) &&
|
||||
(spv->field_def.is_row() ||
|
||||
spv->field_def.is_table_rowtype_ref() ||
|
||||
spv->field_def.is_cursor_rowtype_ref()))
|
||||
return create_item_spvar_row_field(thd, a, b, spv, pos_in_q, length_in_q);
|
||||
return create_item_spvar_row_field(thd, a, b, spv, start, end);
|
||||
|
||||
if ((thd->variables.sql_mode & MODE_ORACLE) && b->length == 7)
|
||||
{
|
||||
@ -6550,7 +6547,7 @@ Item *LEX::create_item_ident(THD *thd,
|
||||
|
||||
Item *LEX::create_item_limit(THD *thd,
|
||||
const LEX_CSTRING *a,
|
||||
uint pos_in_q, uint length_in_q)
|
||||
const char *start, const char *end)
|
||||
{
|
||||
sp_variable *spv;
|
||||
if (!spcont || !(spv= spcont->find_variable(a, false)))
|
||||
@ -6559,10 +6556,11 @@ Item *LEX::create_item_limit(THD *thd,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Query_fragment pos(thd, sphead, start, end);
|
||||
Item_splocal *item;
|
||||
if (!(item= new (thd->mem_root) Item_splocal(thd, a,
|
||||
spv->offset, spv->sql_type(),
|
||||
pos_in_q, length_in_q)))
|
||||
pos.pos(), pos.length())))
|
||||
return NULL;
|
||||
#ifndef DBUG_OFF
|
||||
item->m_sp= sphead;
|
||||
@ -6582,7 +6580,7 @@ Item *LEX::create_item_limit(THD *thd,
|
||||
Item *LEX::create_item_limit(THD *thd,
|
||||
const LEX_CSTRING *a,
|
||||
const LEX_CSTRING *b,
|
||||
uint pos_in_q, uint length_in_q)
|
||||
const char *start, const char *end)
|
||||
{
|
||||
sp_variable *spv;
|
||||
if (!spcont || !(spv= spcont->find_variable(a, false)))
|
||||
@ -6593,8 +6591,7 @@ Item *LEX::create_item_limit(THD *thd,
|
||||
// Qualified %TYPE variables are not possible
|
||||
DBUG_ASSERT(!spv->field_def.column_type_ref());
|
||||
Item_splocal *item;
|
||||
if (!(item= create_item_spvar_row_field(thd, a, b, spv,
|
||||
pos_in_q, length_in_q)))
|
||||
if (!(item= create_item_spvar_row_field(thd, a, b, spv, start, end)))
|
||||
return NULL;
|
||||
if (item->type() != Item::INT_ITEM)
|
||||
{
|
||||
@ -6660,11 +6657,12 @@ Item *LEX::create_item_ident_nosp(THD *thd, LEX_CSTRING *name)
|
||||
|
||||
|
||||
Item *LEX::create_item_ident_sp(THD *thd, LEX_CSTRING *name,
|
||||
uint start_in_q,
|
||||
uint length_in_q)
|
||||
const char *start,
|
||||
const char *end)
|
||||
{
|
||||
sp_variable *spv;
|
||||
DBUG_ASSERT(spcont);
|
||||
DBUG_ASSERT(sphead);
|
||||
if ((spv= spcont->find_variable(name, false)))
|
||||
{
|
||||
/* We're compiling a stored procedure and found a variable */
|
||||
@ -6674,17 +6672,18 @@ Item *LEX::create_item_ident_sp(THD *thd, LEX_CSTRING *name,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Query_fragment pos(thd, sphead, start, end);
|
||||
Item_splocal *splocal= spv->field_def.is_column_type_ref() ?
|
||||
new (thd->mem_root) Item_splocal_with_delayed_data_type(thd, name,
|
||||
spv->offset,
|
||||
start_in_q,
|
||||
length_in_q) :
|
||||
pos.pos(),
|
||||
pos.length()) :
|
||||
spv->field_def.is_row() || spv->field_def.is_table_rowtype_ref() ?
|
||||
new (thd->mem_root) Item_splocal_row(thd, name, spv->offset,
|
||||
start_in_q, length_in_q) :
|
||||
pos.pos(), pos.length()) :
|
||||
new (thd->mem_root) Item_splocal(thd, name,
|
||||
spv->offset, spv->sql_type(),
|
||||
start_in_q, length_in_q);
|
||||
pos.pos(), pos.length());
|
||||
if (splocal == NULL)
|
||||
return NULL;
|
||||
#ifndef DBUG_OFF
|
||||
@ -6705,16 +6704,6 @@ Item *LEX::create_item_ident_sp(THD *thd, LEX_CSTRING *name,
|
||||
}
|
||||
|
||||
|
||||
Item *LEX::create_item_ident_sp(THD *thd, LEX_CSTRING *name,
|
||||
const char *start_in_q,
|
||||
const char *end_in_q)
|
||||
{
|
||||
DBUG_ASSERT(sphead);
|
||||
return create_item_ident_sp(thd, name, start_in_q - sphead->m_tmp_query,
|
||||
end_in_q - start_in_q);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Generate instructions for:
|
||||
SET x.y= expr;
|
||||
|
Reference in New Issue
Block a user