Commit d387bc89 authored by Alexander Barkov's avatar Alexander Barkov

MDEV-13907 compoind.test fails in build-bot for bb-10.2-ext

parent 86c3ba65
...@@ -1542,6 +1542,45 @@ bool mark_unsupported_function(const char *w1, const char *w2, ...@@ -1542,6 +1542,45 @@ bool mark_unsupported_function(const char *w1, const char *w2,
return mark_unsupported_function(ptr, store, result); return mark_unsupported_function(ptr, store, result);
} }
Query_fragment::Query_fragment(THD *thd, sp_head *sphead,
const char *start, const char *end)
{
DBUG_ASSERT(start <= end);
if (sphead)
{
if (sphead->m_tmp_query)
{
// Normal SP statement
DBUG_ASSERT(sphead->m_tmp_query <= start);
set(start - sphead->m_tmp_query, end - start);
}
else
{
/*
We're in the "if" expression of a compound query:
if (expr)
do_something;
end if;
sphead->m_tmp_query is not set yet at this point, because
the "if" part of such statements is never put into the binary log.
Values of Rewritable_query_parameter::pos_in_query and
Rewritable_query_parameter:len_in_query will not be important,
so setting both to 0 should be fine.
*/
set(0, 0);
}
}
else
{
// Non-SP statement
DBUG_ASSERT(thd->query() <= start);
DBUG_ASSERT(end <= thd->query_end());
set(start - thd->query(), end - start);
}
}
/***************************************************************************** /*****************************************************************************
Item_sp_variable methods Item_sp_variable methods
*****************************************************************************/ *****************************************************************************/
......
...@@ -89,6 +89,7 @@ class ValueBuffer: public Value ...@@ -89,6 +89,7 @@ class ValueBuffer: public Value
const char *dbug_print_item(Item *item); const char *dbug_print_item(Item *item);
class sp_head;
class Protocol; class Protocol;
struct TABLE_LIST; struct TABLE_LIST;
void item_init(void); /* Init item functions */ void item_init(void); /* Init item functions */
...@@ -391,6 +392,31 @@ class Settable_routine_parameter ...@@ -391,6 +392,31 @@ class Settable_routine_parameter
{ return NULL; } { return NULL; }
}; };
/*
A helper class to calculate offset and length of a query fragment
- outside of SP
- inside an SP
- inside a compound block
*/
class Query_fragment
{
uint m_pos;
uint m_length;
void set(size_t pos, size_t length)
{
DBUG_ASSERT(pos < UINT_MAX32);
DBUG_ASSERT(length < UINT_MAX32);
m_pos= (uint) pos;
m_length= (uint) length;
}
public:
Query_fragment(THD *thd, sp_head *sphead, const char *start, const char *end);
uint pos() const { return m_pos; }
uint length() const { return m_length; }
};
/** /**
This is used for items in the query that needs to be rewritten This is used for items in the query that needs to be rewritten
before binlogging before binlogging
...@@ -2100,7 +2126,6 @@ class Field_enumerator ...@@ -2100,7 +2126,6 @@ class Field_enumerator
Field_enumerator() {} /* Remove gcc warning */ Field_enumerator() {} /* Remove gcc warning */
}; };
class sp_head;
class Item_string; class Item_string;
......
...@@ -545,6 +545,7 @@ sp_head::sp_head(const Sp_handler *sph) ...@@ -545,6 +545,7 @@ sp_head::sp_head(const Sp_handler *sph)
Database_qualified_name(&null_clex_str, &null_clex_str), Database_qualified_name(&null_clex_str, &null_clex_str),
m_handler(sph), m_handler(sph),
m_flags(0), m_flags(0),
m_tmp_query(NULL),
m_explicit_name(false), m_explicit_name(false),
/* /*
FIXME: the only use case when name is NULL is events, and it should FIXME: the only use case when name is NULL is events, and it should
......
...@@ -1069,6 +1069,10 @@ class Statement: public ilink, public Query_arena ...@@ -1069,6 +1069,10 @@ class Statement: public ilink, public Query_arena
{ {
return static_cast<uint32>(query_string.length()); return static_cast<uint32>(query_string.length());
} }
inline char *query_end() const
{
return query_string.str() + query_string.length();
}
CHARSET_INFO *query_charset() const { return query_string.charset(); } CHARSET_INFO *query_charset() const { return query_string.charset(); }
void set_query_inner(const CSET_STRING &string_arg) void set_query_inner(const CSET_STRING &string_arg)
{ {
......
...@@ -6287,15 +6287,17 @@ Item *LEX::create_and_link_Item_trigger_field(THD *thd, ...@@ -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, 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) if (!parsing_options.allows_variable)
{ {
my_error(ER_VIEW_SELECT_VARIABLE, MYF(0)); my_error(ER_VIEW_SELECT_VARIABLE, MYF(0));
return NULL; return NULL;
} }
Query_fragment pos(thd, sphead, start, end);
Item_param *item= new (thd->mem_root) Item_param(thd, name, 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)) if (!item || param_list.push_back(item, thd->mem_root))
{ {
my_error(ER_OUT_OF_RESOURCES, MYF(0)); my_error(ER_OUT_OF_RESOURCES, MYF(0));
...@@ -6305,12 +6307,6 @@ Item_param *LEX::add_placeholder(THD *thd, const LEX_CSTRING *name, ...@@ -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) bool LEX::add_signal_statement(THD *thd, const sp_condition_value *v)
{ {
Yacc_state *state= &thd->m_parser_state->m_yacc; Yacc_state *state= &thd->m_parser_state->m_yacc;
...@@ -6364,8 +6360,8 @@ Item_splocal *LEX::create_item_spvar_row_field(THD *thd, ...@@ -6364,8 +6360,8 @@ Item_splocal *LEX::create_item_spvar_row_field(THD *thd,
const LEX_CSTRING *a, const LEX_CSTRING *a,
const LEX_CSTRING *b, const LEX_CSTRING *b,
sp_variable *spv, sp_variable *spv,
uint pos_in_q, const char *start,
uint length_in_q) const char *end)
{ {
if (!parsing_options.allows_variable) if (!parsing_options.allows_variable)
{ {
...@@ -6373,6 +6369,7 @@ Item_splocal *LEX::create_item_spvar_row_field(THD *thd, ...@@ -6373,6 +6369,7 @@ Item_splocal *LEX::create_item_spvar_row_field(THD *thd,
return NULL; return NULL;
} }
Query_fragment pos(thd, sphead, start, end);
Item_splocal *item; Item_splocal *item;
if (spv->field_def.is_table_rowtype_ref() || if (spv->field_def.is_table_rowtype_ref() ||
spv->field_def.is_cursor_rowtype_ref()) spv->field_def.is_cursor_rowtype_ref())
...@@ -6380,7 +6377,7 @@ Item_splocal *LEX::create_item_spvar_row_field(THD *thd, ...@@ -6380,7 +6377,7 @@ Item_splocal *LEX::create_item_spvar_row_field(THD *thd,
if (!(item= new (thd->mem_root) if (!(item= new (thd->mem_root)
Item_splocal_row_field_by_name(thd, a, b, spv->offset, Item_splocal_row_field_by_name(thd, a, b, spv->offset,
MYSQL_TYPE_NULL, MYSQL_TYPE_NULL,
pos_in_q, length_in_q))) pos.pos(), pos.length())))
return NULL; return NULL;
} }
else else
...@@ -6394,7 +6391,7 @@ Item_splocal *LEX::create_item_spvar_row_field(THD *thd, ...@@ -6394,7 +6391,7 @@ Item_splocal *LEX::create_item_spvar_row_field(THD *thd,
Item_splocal_row_field(thd, a, b, Item_splocal_row_field(thd, a, b,
spv->offset, row_field_offset, spv->offset, row_field_offset,
def->real_field_type(), def->real_field_type(),
pos_in_q, length_in_q))) pos.pos(), pos.length())))
return NULL; return NULL;
} }
#ifndef DBUG_OFF #ifndef DBUG_OFF
...@@ -6489,14 +6486,14 @@ Item *LEX::create_item_func_setval(THD *thd, Table_ident *table_ident, ...@@ -6489,14 +6486,14 @@ Item *LEX::create_item_func_setval(THD *thd, Table_ident *table_ident,
Item *LEX::create_item_ident(THD *thd, Item *LEX::create_item_ident(THD *thd,
const LEX_CSTRING *a, const LEX_CSTRING *a,
const LEX_CSTRING *b, const LEX_CSTRING *b,
uint pos_in_q, uint length_in_q) const char *start, const char *end)
{ {
sp_variable *spv; sp_variable *spv;
if (spcont && (spv= spcont->find_variable(a, false)) && if (spcont && (spv= spcont->find_variable(a, false)) &&
(spv->field_def.is_row() || (spv->field_def.is_row() ||
spv->field_def.is_table_rowtype_ref() || spv->field_def.is_table_rowtype_ref() ||
spv->field_def.is_cursor_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) if ((thd->variables.sql_mode & MODE_ORACLE) && b->length == 7)
{ {
...@@ -6550,7 +6547,7 @@ Item *LEX::create_item_ident(THD *thd, ...@@ -6550,7 +6547,7 @@ Item *LEX::create_item_ident(THD *thd,
Item *LEX::create_item_limit(THD *thd, Item *LEX::create_item_limit(THD *thd,
const LEX_CSTRING *a, const LEX_CSTRING *a,
uint pos_in_q, uint length_in_q) const char *start, const char *end)
{ {
sp_variable *spv; sp_variable *spv;
if (!spcont || !(spv= spcont->find_variable(a, false))) if (!spcont || !(spv= spcont->find_variable(a, false)))
...@@ -6559,10 +6556,11 @@ Item *LEX::create_item_limit(THD *thd, ...@@ -6559,10 +6556,11 @@ Item *LEX::create_item_limit(THD *thd,
return NULL; return NULL;
} }
Query_fragment pos(thd, sphead, start, end);
Item_splocal *item; Item_splocal *item;
if (!(item= new (thd->mem_root) Item_splocal(thd, a, if (!(item= new (thd->mem_root) Item_splocal(thd, a,
spv->offset, spv->sql_type(), spv->offset, spv->sql_type(),
pos_in_q, length_in_q))) pos.pos(), pos.length())))
return NULL; return NULL;
#ifndef DBUG_OFF #ifndef DBUG_OFF
item->m_sp= sphead; item->m_sp= sphead;
...@@ -6582,7 +6580,7 @@ Item *LEX::create_item_limit(THD *thd, ...@@ -6582,7 +6580,7 @@ Item *LEX::create_item_limit(THD *thd,
Item *LEX::create_item_limit(THD *thd, Item *LEX::create_item_limit(THD *thd,
const LEX_CSTRING *a, const LEX_CSTRING *a,
const LEX_CSTRING *b, const LEX_CSTRING *b,
uint pos_in_q, uint length_in_q) const char *start, const char *end)
{ {
sp_variable *spv; sp_variable *spv;
if (!spcont || !(spv= spcont->find_variable(a, false))) if (!spcont || !(spv= spcont->find_variable(a, false)))
...@@ -6593,8 +6591,7 @@ Item *LEX::create_item_limit(THD *thd, ...@@ -6593,8 +6591,7 @@ Item *LEX::create_item_limit(THD *thd,
// Qualified %TYPE variables are not possible // Qualified %TYPE variables are not possible
DBUG_ASSERT(!spv->field_def.column_type_ref()); DBUG_ASSERT(!spv->field_def.column_type_ref());
Item_splocal *item; Item_splocal *item;
if (!(item= create_item_spvar_row_field(thd, a, b, spv, if (!(item= create_item_spvar_row_field(thd, a, b, spv, start, end)))
pos_in_q, length_in_q)))
return NULL; return NULL;
if (item->type() != Item::INT_ITEM) if (item->type() != Item::INT_ITEM)
{ {
...@@ -6660,11 +6657,12 @@ Item *LEX::create_item_ident_nosp(THD *thd, LEX_CSTRING *name) ...@@ -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, Item *LEX::create_item_ident_sp(THD *thd, LEX_CSTRING *name,
uint start_in_q, const char *start,
uint length_in_q) const char *end)
{ {
sp_variable *spv; sp_variable *spv;
DBUG_ASSERT(spcont); DBUG_ASSERT(spcont);
DBUG_ASSERT(sphead);
if ((spv= spcont->find_variable(name, false))) if ((spv= spcont->find_variable(name, false)))
{ {
/* We're compiling a stored procedure and found a variable */ /* 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, ...@@ -6674,17 +6672,18 @@ Item *LEX::create_item_ident_sp(THD *thd, LEX_CSTRING *name,
return NULL; return NULL;
} }
Query_fragment pos(thd, sphead, start, end);
Item_splocal *splocal= spv->field_def.is_column_type_ref() ? Item_splocal *splocal= spv->field_def.is_column_type_ref() ?
new (thd->mem_root) Item_splocal_with_delayed_data_type(thd, name, new (thd->mem_root) Item_splocal_with_delayed_data_type(thd, name,
spv->offset, spv->offset,
start_in_q, pos.pos(),
length_in_q) : pos.length()) :
spv->field_def.is_row() || spv->field_def.is_table_rowtype_ref() ? spv->field_def.is_row() || spv->field_def.is_table_rowtype_ref() ?
new (thd->mem_root) Item_splocal_row(thd, name, spv->offset, 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, new (thd->mem_root) Item_splocal(thd, name,
spv->offset, spv->sql_type(), spv->offset, spv->sql_type(),
start_in_q, length_in_q); pos.pos(), pos.length());
if (splocal == NULL) if (splocal == NULL)
return NULL; return NULL;
#ifndef DBUG_OFF #ifndef DBUG_OFF
...@@ -6705,16 +6704,6 @@ Item *LEX::create_item_ident_sp(THD *thd, LEX_CSTRING *name, ...@@ -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: Generate instructions for:
SET x.y= expr; SET x.y= expr;
......
...@@ -2994,8 +2994,6 @@ struct LEX: public Query_tables_list ...@@ -2994,8 +2994,6 @@ struct LEX: public Query_tables_list
void start(THD *thd); void start(THD *thd);
const char *substatement_query(THD *thd) const;
inline bool is_ps_or_view_context_analysis() inline bool is_ps_or_view_context_analysis()
{ {
return (context_analysis_only & return (context_analysis_only &
...@@ -3226,22 +3224,16 @@ struct LEX: public Query_tables_list ...@@ -3226,22 +3224,16 @@ struct LEX: public Query_tables_list
bool sp_open_cursor(THD *thd, const LEX_CSTRING *name, bool sp_open_cursor(THD *thd, const LEX_CSTRING *name,
List<sp_assignment_lex> *parameters); List<sp_assignment_lex> *parameters);
Item_splocal *create_item_for_sp_var(LEX_CSTRING *name, sp_variable *spvar, Item_splocal *create_item_for_sp_var(LEX_CSTRING *name, sp_variable *spvar,
const char *start_in_q, const char *start, const char *end);
const char *end_in_q);
Item *create_item_ident_nosp(THD *thd, LEX_CSTRING *name); Item *create_item_ident_nosp(THD *thd, LEX_CSTRING *name);
Item *create_item_ident_sp(THD *thd, LEX_CSTRING *name, Item *create_item_ident_sp(THD *thd, LEX_CSTRING *name,
uint start_in_q, const char *start, const char *end);
uint length_in_q);
Item *create_item_ident_sp(THD *thd, LEX_CSTRING *name,
const char *start_in_q,
const char *end_in_q);
Item *create_item_ident(THD *thd, LEX_CSTRING *name, Item *create_item_ident(THD *thd, LEX_CSTRING *name,
const char *start_in_q, const char *start, const char *end)
const char *end_in_q)
{ {
return sphead ? return sphead ?
create_item_ident_sp(thd, name, start_in_q, end_in_q) : create_item_ident_sp(thd, name, start, end) :
create_item_ident_nosp(thd, name); create_item_ident_nosp(thd, name);
} }
...@@ -3268,15 +3260,15 @@ struct LEX: public Query_tables_list ...@@ -3268,15 +3260,15 @@ struct LEX: public Query_tables_list
@param field - the ROW variable field name @param field - the ROW variable field name
@param spvar - the variable that was previously found by name @param spvar - the variable that was previously found by name
using "var_name". using "var_name".
@pos_in_q - position in the query (for binary log) @param start - position in the query (for binary log)
@length_in_q - length in the query (for binary log) @param end - end in the query (for binary log)
*/ */
Item_splocal *create_item_spvar_row_field(THD *thd, Item_splocal *create_item_spvar_row_field(THD *thd,
const LEX_CSTRING *var, const LEX_CSTRING *var,
const LEX_CSTRING *field, const LEX_CSTRING *field,
sp_variable *spvar, sp_variable *spvar,
uint pos_in_q, const char *start,
uint length_in_q); const char *end);
/* /*
Create an item from its qualified name. Create an item from its qualified name.
Depending on context, it can be either a ROW variable field, Depending on context, it can be either a ROW variable field,
...@@ -3286,15 +3278,15 @@ struct LEX: public Query_tables_list ...@@ -3286,15 +3278,15 @@ struct LEX: public Query_tables_list
@param thd - THD, for mem_root @param thd - THD, for mem_root
@param a - the first name @param a - the first name
@param b - the second name @param b - the second name
@param pos_in_q - position in the query (for binary log) @param start - position in the query (for binary log)
@param length_in_q - length in the query (for binary log) @param end - end in the query (for binary log)
@retval - NULL on error, or a pointer to a new Item. @retval - NULL on error, or a pointer to a new Item.
*/ */
Item *create_item_ident(THD *thd, Item *create_item_ident(THD *thd,
const LEX_CSTRING *a, const LEX_CSTRING *a,
const LEX_CSTRING *b, const LEX_CSTRING *b,
uint pos_in_q, uint length_in_q); const char *start,
const char *end);
/* /*
Create an item from its qualified name. Create an item from its qualified name.
Depending on context, it can be a table field, a table field reference, Depending on context, it can be a table field, a table field reference,
...@@ -3333,23 +3325,24 @@ struct LEX: public Query_tables_list ...@@ -3333,23 +3325,24 @@ struct LEX: public Query_tables_list
Create an item for a name in LIMIT clause: LIMIT var Create an item for a name in LIMIT clause: LIMIT var
@param THD - THD, for mem_root @param THD - THD, for mem_root
@param var_name - the variable name @param var_name - the variable name
@param pos_in_q - position in the query (for binary log) @param start - position in the query (for binary log)
@param length_in_q - length in the query (for binary log) @param end - end in the query (for binary log)
@retval - a new Item corresponding to the SP variable, @retval - a new Item corresponding to the SP variable,
or NULL on error or NULL on error
(non in SP, unknown variable, wrong data type). (non in SP, unknown variable, wrong data type).
*/ */
Item *create_item_limit(THD *thd, Item *create_item_limit(THD *thd,
const LEX_CSTRING *var_name, const LEX_CSTRING *var_name,
uint pos_in_q, uint length_in_q); const char *start,
const char *end);
/* /*
Create an item for a qualified name in LIMIT clause: LIMIT var.field Create an item for a qualified name in LIMIT clause: LIMIT var.field
@param THD - THD, for mem_root @param THD - THD, for mem_root
@param var_name - the variable name @param var_name - the variable name
@param field_name - the variable field name @param field_name - the variable field name
@param pos_in_q - position in the query (for binary log) @param start - start in the query (for binary log)
@param length_in_q - length in the query (for binary log) @param end - end in the query (for binary log)
@retval - a new Item corresponding to the SP variable, @retval - a new Item corresponding to the SP variable,
or NULL on error or NULL on error
(non in SP, unknown variable, unknown ROW field, (non in SP, unknown variable, unknown ROW field,
...@@ -3358,7 +3351,8 @@ struct LEX: public Query_tables_list ...@@ -3358,7 +3351,8 @@ struct LEX: public Query_tables_list
Item *create_item_limit(THD *thd, Item *create_item_limit(THD *thd,
const LEX_CSTRING *var_name, const LEX_CSTRING *var_name,
const LEX_CSTRING *field_name, const LEX_CSTRING *field_name,
uint pos_in_q, uint length_in_q); const char *start,
const char *end);
Item *make_item_func_replace(THD *thd, Item *org, Item *find, Item *replace); Item *make_item_func_replace(THD *thd, Item *org, Item *find, Item *replace);
...@@ -3441,16 +3435,7 @@ struct LEX: public Query_tables_list ...@@ -3441,16 +3435,7 @@ struct LEX: public Query_tables_list
bool sp_push_goto_label(THD *thd, const LEX_CSTRING *label_name); bool sp_push_goto_label(THD *thd, const LEX_CSTRING *label_name);
Item_param *add_placeholder(THD *thd, const LEX_CSTRING *name, Item_param *add_placeholder(THD *thd, const LEX_CSTRING *name,
uint pos_in_query, uint len_in_query); const char *start, const char *end);
Item_param *add_placeholder(THD *thd, const LEX_CSTRING *name,
const char *start, const char *end)
{
size_t pos= start - substatement_query(thd);
size_t len= end - start;
DBUG_ASSERT(pos < UINT_MAX32);
DBUG_ASSERT(len < UINT_MAX32);
return add_placeholder(thd, name, (uint) pos, (uint) len);
}
/* Integer range FOR LOOP methods */ /* Integer range FOR LOOP methods */
sp_variable *sp_add_for_loop_variable(THD *thd, const LEX_CSTRING *name, sp_variable *sp_add_for_loop_variable(THD *thd, const LEX_CSTRING *name,
......
...@@ -11926,9 +11926,7 @@ limit_option: ...@@ -11926,9 +11926,7 @@ limit_option:
LEX *lex= thd->lex; LEX *lex= thd->lex;
Lex_input_stream *lip= & thd->m_parser_state->m_lip; Lex_input_stream *lip= & thd->m_parser_state->m_lip;
if (!($$= lex->create_item_limit(thd, &$1, if (!($$= lex->create_item_limit(thd, &$1,
$1.m_pos - $1.m_pos, lip->get_tok_end())))
lex->substatement_query(thd),
lip->get_tok_end() - $1.m_pos)))
MYSQL_YYABORT; MYSQL_YYABORT;
} }
| ident_with_tok_start '.' ident | ident_with_tok_start '.' ident
...@@ -11936,9 +11934,7 @@ limit_option: ...@@ -11936,9 +11934,7 @@ limit_option:
LEX *lex= thd->lex; LEX *lex= thd->lex;
Lex_input_stream *lip= & thd->m_parser_state->m_lip; Lex_input_stream *lip= & thd->m_parser_state->m_lip;
if (!($$= lex->create_item_limit(thd, &$1, &$3, if (!($$= lex->create_item_limit(thd, &$1, &$3,
$1.m_pos - $1.m_pos, lip->get_ptr())))
lex->substatement_query(thd),
lip->get_ptr() - $1.m_pos)))
MYSQL_YYABORT; MYSQL_YYABORT;
} }
| param_marker | param_marker
...@@ -14239,9 +14235,7 @@ simple_ident: ...@@ -14239,9 +14235,7 @@ simple_ident:
{ {
LEX *lex= thd->lex; LEX *lex= thd->lex;
if (!($$= lex->create_item_ident(thd, &$1, &$3, if (!($$= lex->create_item_ident(thd, &$1, &$3,
$1.m_pos - $1.m_pos, YYLIP->get_tok_end())))
lex->substatement_query(thd),
YYLIP->get_tok_end() - $1.m_pos)))
MYSQL_YYABORT; MYSQL_YYABORT;
} }
; ;
......
...@@ -11983,9 +11983,7 @@ limit_option: ...@@ -11983,9 +11983,7 @@ limit_option:
LEX *lex= thd->lex; LEX *lex= thd->lex;
Lex_input_stream *lip= & thd->m_parser_state->m_lip; Lex_input_stream *lip= & thd->m_parser_state->m_lip;
if (!($$= lex->create_item_limit(thd, &$1, if (!($$= lex->create_item_limit(thd, &$1,
$1.m_pos - $1.m_pos, lip->get_tok_end())))
lex->substatement_query(thd),
lip->get_tok_end() - $1.m_pos)))
MYSQL_YYABORT; MYSQL_YYABORT;
} }
| ident_with_tok_start '.' ident | ident_with_tok_start '.' ident
...@@ -11993,9 +11991,7 @@ limit_option: ...@@ -11993,9 +11991,7 @@ limit_option:
LEX *lex= thd->lex; LEX *lex= thd->lex;
Lex_input_stream *lip= & thd->m_parser_state->m_lip; Lex_input_stream *lip= & thd->m_parser_state->m_lip;
if (!($$= lex->create_item_limit(thd, &$1, &$3, if (!($$= lex->create_item_limit(thd, &$1, &$3,
$1.m_pos - $1.m_pos, lip->get_ptr())))
lex->substatement_query(thd),
lip->get_ptr() - $1.m_pos)))
MYSQL_YYABORT; MYSQL_YYABORT;
} }
| param_marker | param_marker
...@@ -14315,9 +14311,7 @@ simple_ident: ...@@ -14315,9 +14311,7 @@ simple_ident:
{ {
LEX *lex= thd->lex; LEX *lex= thd->lex;
if (!($$= lex->create_item_ident(thd, &$1, &$3, if (!($$= lex->create_item_ident(thd, &$1, &$3,
$1.m_pos - $1.m_pos, YYLIP->get_tok_end())))
lex->substatement_query(thd),
YYLIP->get_tok_end() - $1.m_pos)))
MYSQL_YYABORT; MYSQL_YYABORT;
} }
; ;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment