1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

cleanup: rename List<> methods

prepand() -> prepend()
concat() -> append()
This commit is contained in:
Sergei Golubchik
2014-08-15 17:35:07 +02:00
parent aabb33cc54
commit 43d1f0b6b9
9 changed files with 21 additions and 21 deletions

View File

@@ -5869,7 +5869,7 @@ void Item_equal::merge(Item_equal *item)
Item *c= item->get_const();
if (c)
item->equal_items.pop();
equal_items.concat(&item->equal_items);
equal_items.append(&item->equal_items);
if (c)
{
/*

View File

@@ -1652,12 +1652,12 @@ public:
void add_at_head(List<Item> *nlist)
{
DBUG_ASSERT(nlist->elements);
list.prepand(nlist);
list.prepend(nlist);
}
void add_at_end(List<Item> *nlist)
{
DBUG_ASSERT(nlist->elements);
list.concat(nlist);
list.append(nlist);
}
bool fix_fields(THD *, Item **ref);
void fix_after_pullout(st_select_lex *new_parent, Item **ref);

View File

@@ -1457,7 +1457,7 @@ mem_err:
inline void imerge_list_and_list(List<SEL_IMERGE> *im1, List<SEL_IMERGE> *im2)
{
im1->concat(im2);
im1->append(im2);
}
@@ -1633,7 +1633,7 @@ int imerge_list_or_tree(RANGE_OPT_PARAM *param,
it.remove();
}
merges->concat(&additional_merges);
merges->append(&additional_merges);
return merges->is_empty();
}

View File

@@ -1515,7 +1515,7 @@ static bool convert_subq_to_sj(JOIN *parent_join, Item_in_subselect *subq_pred)
NOTE: We actually insert them at the front! That's because the order is
reversed in this list.
*/
parent_lex->leaf_tables.concat(&subq_lex->leaf_tables);
parent_lex->leaf_tables.append(&subq_lex->leaf_tables);
if (subq_lex->options & OPTION_SCHEMA_TABLE)
parent_lex->options |= OPTION_SCHEMA_TABLE;

View File

@@ -7376,7 +7376,7 @@ store_natural_using_join_columns(THD *thd, TABLE_LIST *natural_using_join,
}
if (non_join_columns->elements > 0)
natural_using_join->join_columns->concat(non_join_columns);
natural_using_join->join_columns->append(non_join_columns);
natural_using_join->is_join_columns_complete= TRUE;
result= FALSE;

View File

@@ -3746,7 +3746,7 @@ bool SELECT_LEX::merge_subquery(THD *thd, TABLE_LIST *derived,
{
derived->wrap_into_nested_join(subq_select->top_join_list);
ftfunc_list->concat(subq_select->ftfunc_list);
ftfunc_list->append(subq_select->ftfunc_list);
if (join ||
thd->lex->sql_command == SQLCOM_UPDATE_MULTI ||
thd->lex->sql_command == SQLCOM_DELETE_MULTI)

View File

@@ -244,7 +244,7 @@ public:
delete *prev;
*prev=node;
}
inline void concat(base_list *list)
inline void append(base_list *list)
{
if (!list->is_empty())
{
@@ -290,7 +290,7 @@ public:
*prev= &end_of_list;
last= prev;
}
inline void prepand(base_list *list)
inline void prepend(base_list *list)
{
if (!list->is_empty())
{
@@ -516,9 +516,9 @@ public:
inline T* head() {return (T*) base_list::head(); }
inline T** head_ref() {return (T**) base_list::head_ref(); }
inline T* pop() {return (T*) base_list::pop(); }
inline void concat(List<T> *list) { base_list::concat(list); }
inline void append(List<T> *list) { base_list::append(list); }
inline void prepend(List<T> *list) { base_list::prepend(list); }
inline void disjoin(List<T> *list) { base_list::disjoin(list); }
inline void prepand(List<T> *list) { base_list::prepand(list); }
inline bool add_unique(T *a, bool (*eq)(T *a, T *b))
{ return base_list::add_unique(a, (List_eq *)eq); }
void delete_elements(void)

View File

@@ -12711,8 +12711,8 @@ static COND *build_equal_items_for_cond(THD *thd, COND *cond,
}
if (and_level)
{
args->concat(&eq_list);
args->concat((List<Item> *)&cond_equal.current_level);
args->append(&eq_list);
args->append((List<Item> *)&cond_equal.current_level);
}
}
else if (cond->type() == Item::FUNC_ITEM ||
@@ -12767,7 +12767,7 @@ static COND *build_equal_items_for_cond(THD *thd, COND *cond,
}
and_cond->cond_equal.copy(cond_equal);
cond_equal.current_level= and_cond->cond_equal.current_level;
args->concat((List<Item> *)&cond_equal.current_level);
args->append((List<Item> *)&cond_equal.current_level);
return and_cond;
}
@@ -13421,7 +13421,7 @@ static COND* substitute_for_best_equal_field(JOIN_TAB *context_tab,
This is a fatal error now. However we bail out by returning the
original condition that we had before we started the transformation.
*/
cond_list->concat((List<Item> *) &cond_equal->current_level);
cond_list->append((List<Item> *) &cond_equal->current_level);
}
}
}
@@ -14692,7 +14692,7 @@ internal_remove_eq_conds(THD *thd, COND *cond, Item::cond_result *cond_value)
if (eq_item->const_item() && eq_item->val_int())
it.remove();
}
cond_arg_list->concat((List<Item> *) cond_equalities);
cond_arg_list->append((List<Item> *) cond_equalities);
}
List<Item_equal> new_equalities;
@@ -14749,7 +14749,7 @@ internal_remove_eq_conds(THD *thd, COND *cond, Item::cond_result *cond_value)
of cond_arg_list all together.
*/
new_item_arg_list->disjoin((List<Item> *) new_item_equalities);
new_equalities.concat(new_item_equalities);
new_equalities.append(new_item_equalities);
}
}
if (new_item_arg_list->is_empty())
@@ -14844,7 +14844,7 @@ internal_remove_eq_conds(THD *thd, COND *cond, Item::cond_result *cond_value)
}
}
}
cond_arg_list->concat((List<Item> *) cond_equalities);
cond_arg_list->append((List<Item> *) cond_equalities);
/*
Propagate the newly formed multiple equalities to
the all AND/OR levels of cond
@@ -22009,7 +22009,7 @@ setup_copy_fields(THD *thd, TMP_TABLE_PARAM *param,
Put elements from HAVING, ORDER BY and GROUP BY last to ensure that any
reference used in these will resolve to a item that is already calculated
*/
param->copy_funcs.concat(&extra_funcs);
param->copy_funcs.append(&extra_funcs);
DBUG_RETURN(0);

View File

@@ -1965,7 +1965,7 @@ loop_end:
DBUG_RETURN(1);
} while ((tbl= tbl_it++));
temp_fields.concat(fields_for_table[cnt]);
temp_fields.append(fields_for_table[cnt]);
/* Make an unique key over the first field to avoid duplicated updates */
bzero((char*) &group, sizeof(group));