mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Yet another manual merge with main tree for patch for WL#1218 "Triggers"
This commit is contained in:
@ -30,6 +30,15 @@
|
||||
*/
|
||||
sys_var_long_ptr trg_new_row_fake_var(0, 0);
|
||||
|
||||
/*
|
||||
Fake table list object, pointer to which is used as special value for
|
||||
st_lex::time_zone_tables_used indicating that we implicitly use time
|
||||
zone tables in this statement but real table list was not yet created.
|
||||
Pointer to it is also returned by my_tz_get_tables_list() as indication
|
||||
of transient error;
|
||||
*/
|
||||
TABLE_LIST fake_time_zone_tables_list;
|
||||
|
||||
/* Macros to look like lex */
|
||||
|
||||
#define yyGet() *(lex->ptr++)
|
||||
@ -1011,7 +1020,7 @@ void st_select_lex::init_query()
|
||||
subquery_in_having= explicit_limit= 0;
|
||||
first_execution= 1;
|
||||
first_cond_optimization= 1;
|
||||
parsing_place= SELECT_LEX_NODE::NO_MATTER;
|
||||
parsing_place= NO_MATTER;
|
||||
no_wrap_view_item= 0;
|
||||
}
|
||||
|
||||
@ -1383,7 +1392,7 @@ bool st_select_lex::setup_ref_array(THD *thd, uint order_group_num)
|
||||
We have to create array in prepared statement memory if it is
|
||||
prepared statement
|
||||
*/
|
||||
Item_arena *arena= thd->current_arena ? thd->current_arena : thd;
|
||||
Item_arena *arena= thd->current_arena;
|
||||
return (ref_pointer_array=
|
||||
(Item **)arena->alloc(sizeof(Item*) *
|
||||
(item_list.elements +
|
||||
@ -1792,10 +1801,10 @@ void st_lex::link_first_table_back(TABLE_LIST *first,
|
||||
|
||||
void st_select_lex::fix_prepare_information(THD *thd, Item **conds)
|
||||
{
|
||||
if (thd->current_arena && first_execution)
|
||||
if (thd->current_arena->is_stmt_prepare() && first_execution)
|
||||
{
|
||||
prep_where= where;
|
||||
first_execution= 0;
|
||||
prep_where= where;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user