mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge branch '11.1' into 11.2
This commit is contained in:
@ -6291,7 +6291,7 @@ find_field_in_natural_join(THD *thd, TABLE_LIST *table_ref, const char *name, si
|
||||
{
|
||||
if (nj_col)
|
||||
{
|
||||
my_error(ER_NON_UNIQ_ERROR, MYF(0), name, thd->where);
|
||||
my_error(ER_NON_UNIQ_ERROR, MYF(0), name, thd_where(thd));
|
||||
DBUG_RETURN(NULL);
|
||||
}
|
||||
nj_col= curr_nj_col;
|
||||
@ -6936,7 +6936,7 @@ find_field_in_tables(THD *thd, Item_ident *item,
|
||||
item->cached_field_index= NO_CACHED_FIELD_INDEX;
|
||||
}
|
||||
|
||||
DBUG_ASSERT(thd->where);
|
||||
DBUG_ASSERT(thd->where != THD_WHERE::NOWHERE);
|
||||
/*
|
||||
If we found a fully qualified field we return it directly as it can't
|
||||
have duplicates.
|
||||
@ -6949,7 +6949,7 @@ find_field_in_tables(THD *thd, Item_ident *item,
|
||||
if (report_error == REPORT_ALL_ERRORS ||
|
||||
report_error == IGNORE_EXCEPT_NON_UNIQUE)
|
||||
my_error(ER_NON_UNIQ_ERROR, MYF(0),
|
||||
table_name ? item->full_name() : name, thd->where);
|
||||
table_name ? item->full_name() : name, thd_where(thd));
|
||||
return (Field*) 0;
|
||||
}
|
||||
found= cur_field;
|
||||
@ -6977,13 +6977,13 @@ find_field_in_tables(THD *thd, Item_ident *item,
|
||||
strxnmov(buff,sizeof(buff)-1,db,".",table_name,NullS);
|
||||
table_name=buff;
|
||||
}
|
||||
my_error(ER_UNKNOWN_TABLE, MYF(0), table_name, thd->where);
|
||||
my_error(ER_UNKNOWN_TABLE, MYF(0), table_name, thd_where(thd));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (report_error == REPORT_ALL_ERRORS ||
|
||||
report_error == REPORT_EXCEPT_NON_UNIQUE)
|
||||
my_error(ER_BAD_FIELD_ERROR, MYF(0), item->full_name(), thd->where);
|
||||
my_error(ER_BAD_FIELD_ERROR, MYF(0), item->full_name(), thd_where(thd));
|
||||
else
|
||||
found= not_found_field;
|
||||
}
|
||||
@ -7116,7 +7116,7 @@ find_item_in_list(Item *find, List<Item> &items, uint *counter,
|
||||
*/
|
||||
if (report_error != IGNORE_ERRORS)
|
||||
my_error(ER_NON_UNIQ_ERROR, MYF(0),
|
||||
find->full_name(), current_thd->where);
|
||||
find->full_name(), thd_where(current_thd));
|
||||
return (Item**) 0;
|
||||
}
|
||||
found_unaliased= li.ref();
|
||||
@ -7147,7 +7147,7 @@ find_item_in_list(Item *find, List<Item> &items, uint *counter,
|
||||
continue; // Same field twice
|
||||
if (report_error != IGNORE_ERRORS)
|
||||
my_error(ER_NON_UNIQ_ERROR, MYF(0),
|
||||
find->full_name(), current_thd->where);
|
||||
find->full_name(), thd_where(current_thd));
|
||||
return (Item**) 0;
|
||||
}
|
||||
found= li.ref();
|
||||
@ -7202,7 +7202,7 @@ find_item_in_list(Item *find, List<Item> &items, uint *counter,
|
||||
{
|
||||
if (report_error != IGNORE_ERRORS)
|
||||
my_error(ER_NON_UNIQ_ERROR, MYF(0),
|
||||
find->full_name(), current_thd->where);
|
||||
find->full_name(), thd_where(current_thd));
|
||||
return (Item **) 0;
|
||||
}
|
||||
if (found_unaliased)
|
||||
@ -7219,7 +7219,7 @@ find_item_in_list(Item *find, List<Item> &items, uint *counter,
|
||||
{
|
||||
if (report_error == REPORT_ALL_ERRORS)
|
||||
my_error(ER_BAD_FIELD_ERROR, MYF(0),
|
||||
find->full_name(), current_thd->where);
|
||||
find->full_name(), thd_where(current_thd));
|
||||
return (Item **) 0;
|
||||
}
|
||||
else
|
||||
@ -7425,7 +7425,7 @@ mark_common_columns(THD *thd, TABLE_LIST *table_ref_1, TABLE_LIST *table_ref_2,
|
||||
DBUG_PRINT ("info", ("match c1.is_common=%d", nj_col_1->is_common));
|
||||
if (cur_nj_col_2->is_common || found)
|
||||
{
|
||||
my_error(ER_NON_UNIQ_ERROR, MYF(0), field_name_1->str, thd->where);
|
||||
my_error(ER_NON_UNIQ_ERROR, MYF(0), field_name_1->str, thd_where(thd));
|
||||
goto err;
|
||||
}
|
||||
if ((!using_fields && !field_2_invisible) || is_using_column_1)
|
||||
@ -7639,7 +7639,7 @@ store_natural_using_join_columns(THD *thd, TABLE_LIST *natural_using_join,
|
||||
if (!(common_field= it++))
|
||||
{
|
||||
my_error(ER_BAD_FIELD_ERROR, MYF(0), using_field_name_ptr,
|
||||
current_thd->where);
|
||||
thd_where(current_thd));
|
||||
goto err;
|
||||
}
|
||||
if (!my_strcasecmp(system_charset_info,
|
||||
@ -7893,7 +7893,7 @@ static bool setup_natural_join_row_types(THD *thd,
|
||||
Name_resolution_context *context)
|
||||
{
|
||||
DBUG_ENTER("setup_natural_join_row_types");
|
||||
thd->where= "from clause";
|
||||
thd->where= THD_WHERE::FROM_CLAUSE;
|
||||
if (from_clause->elements == 0)
|
||||
DBUG_RETURN(false); /* We come here in the case of UNIONs. */
|
||||
|
||||
@ -8067,7 +8067,7 @@ bool setup_fields(THD *thd, Ref_ptr_array ref_pointer_array,
|
||||
lex->current_select->nest_level);
|
||||
if (allow_sum_func)
|
||||
lex->allow_sum_func.set_bit(lex->current_select->nest_level);
|
||||
thd->where= THD::DEFAULT_WHERE;
|
||||
thd->where= THD_WHERE::DEFAULT_WHERE;
|
||||
save_is_item_list_lookup= lex->current_select->is_item_list_lookup;
|
||||
lex->current_select->is_item_list_lookup= 0;
|
||||
|
||||
@ -8824,7 +8824,7 @@ bool setup_on_expr(THD *thd, TABLE_LIST *table, bool is_update)
|
||||
embedded= embedding;
|
||||
if (embedded->on_expr)
|
||||
{
|
||||
thd->where="on clause";
|
||||
thd->where= THD_WHERE::ON_CLAUSE;
|
||||
embedded->on_expr->mark_as_condition_AND_part(embedded);
|
||||
if (embedded->on_expr->fix_fields_if_needed_for_bool(thd,
|
||||
&embedded->on_expr))
|
||||
@ -8925,7 +8925,7 @@ int setup_conds(THD *thd, TABLE_LIST *tables, List<TABLE_LIST> &leaves,
|
||||
|
||||
if (*conds)
|
||||
{
|
||||
thd->where="where clause";
|
||||
thd->where= THD_WHERE::WHERE_CLAUSE;
|
||||
DBUG_EXECUTE("where",
|
||||
print_where(*conds,
|
||||
"WHERE in setup_conds",
|
||||
|
Reference in New Issue
Block a user