mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge 10.1 into 10.2
This commit is contained in:
@ -2132,7 +2132,7 @@ void st_select_lex::init_query()
|
||||
hidden_bit_fields= 0;
|
||||
subquery_in_having= explicit_limit= 0;
|
||||
is_item_list_lookup= 0;
|
||||
first_execution= 1;
|
||||
changed_elements= 0;
|
||||
first_natural_join_processing= 1;
|
||||
first_cond_optimization= 1;
|
||||
parsing_place= NO_MATTER;
|
||||
@ -3661,9 +3661,10 @@ void st_select_lex::fix_prepare_information(THD *thd, Item **conds,
|
||||
Item **having_conds)
|
||||
{
|
||||
DBUG_ENTER("st_select_lex::fix_prepare_information");
|
||||
if (!thd->stmt_arena->is_conventional() && first_execution)
|
||||
if (!thd->stmt_arena->is_conventional() &&
|
||||
!(changed_elements & TOUCHED_SEL_COND))
|
||||
{
|
||||
first_execution= 0;
|
||||
changed_elements|= TOUCHED_SEL_COND;
|
||||
if (group_list.first)
|
||||
{
|
||||
if (!group_list_ptrs)
|
||||
@ -3914,14 +3915,7 @@ bool st_select_lex::optimize_unflattened_subqueries(bool const_only)
|
||||
|
||||
bool st_select_lex::handle_derived(LEX *lex, uint phases)
|
||||
{
|
||||
for (TABLE_LIST *cursor= (TABLE_LIST*) table_list.first;
|
||||
cursor;
|
||||
cursor= cursor->next_local)
|
||||
{
|
||||
if (cursor->is_view_or_derived() && cursor->handle_derived(lex, phases))
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
return lex->handle_list_of_derived(table_list.first, phases);
|
||||
}
|
||||
|
||||
|
||||
@ -4843,6 +4837,20 @@ bool LEX::is_partition_management() const
|
||||
alter_info.flags == Alter_info::ALTER_REORGANIZE_PARTITION));
|
||||
}
|
||||
|
||||
|
||||
bool Sql_cmd::log_slow_enabled_statement(const THD *thd) const
|
||||
{
|
||||
return global_system_variables.sql_log_slow && thd->variables.sql_log_slow;
|
||||
}
|
||||
|
||||
|
||||
bool Sql_cmd_admin::log_slow_enabled_statement(const THD *thd) const
|
||||
{
|
||||
return opt_log_slow_admin_statements &&
|
||||
Sql_cmd::log_slow_enabled_statement(thd);
|
||||
}
|
||||
|
||||
|
||||
#ifdef MYSQL_SERVER
|
||||
uint binlog_unsafe_map[256];
|
||||
|
||||
|
Reference in New Issue
Block a user