mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
cleanup: comments referring to non-extistent Item classes
This commit is contained in:
@@ -965,7 +965,6 @@ public:
|
||||
friend class Item_std_field;
|
||||
friend class Item_sum_num;
|
||||
friend class Item_sum_sum;
|
||||
friend class Item_sum_str;
|
||||
friend class Item_sum_count;
|
||||
friend class Item_sum_avg;
|
||||
friend class Item_sum_std;
|
||||
|
||||
@@ -4413,7 +4413,7 @@ int ha_partition::delete_row(const uchar *buf)
|
||||
removed as a result of a SQL statement.
|
||||
|
||||
Called from item_sum.cc by Item_func_group_concat::clear(),
|
||||
Item_sum_count_distinct::clear(), and Item_func_group_concat::clear().
|
||||
Item_sum_count::clear(), and Item_func_group_concat::clear().
|
||||
Called from sql_delete.cc by mysql_delete().
|
||||
Called from sql_select.cc by JOIN::reset().
|
||||
Called from sql_union.cc by st_select_lex_unit::exec().
|
||||
|
||||
@@ -7102,7 +7102,7 @@ void Item_ref::cleanup()
|
||||
Transform an Item_ref object with a transformer callback function.
|
||||
|
||||
The function first applies the transform method to the item
|
||||
referenced by this Item_reg object. If this returns a new item the
|
||||
referenced by this Item_ref object. If this returns a new item the
|
||||
old item is substituted for a new one. After this the transformer
|
||||
is applied to the Item_ref object.
|
||||
|
||||
@@ -8166,7 +8166,7 @@ Item *Item_direct_view_ref::equal_fields_propagator(uchar *arg)
|
||||
object belongs to unless item_equal contains a constant item. In this
|
||||
case the function returns this constant item (if the substitution does
|
||||
not require conversion).
|
||||
If the Item_direct_view_item object does not refer any Item_equal object
|
||||
If the Item_direct_view_ref object does not refer any Item_equal object
|
||||
'this' is returned .
|
||||
|
||||
@param arg NULL or points to so some item of the Item_equal type
|
||||
@@ -8620,7 +8620,7 @@ void resolve_const_item(THD *thd, Item **ref, Item *comp_item)
|
||||
if (item->type() == Item::ROW_ITEM && comp_item->type() == Item::ROW_ITEM)
|
||||
{
|
||||
/*
|
||||
Substitute constants only in Item_rows. Don't affect other Items
|
||||
Substitute constants only in Item_row's. Don't affect other Items
|
||||
with ROW_RESULT (eg Item_singlerow_subselect).
|
||||
|
||||
For such Items more optimal is to detect if it is constant and replace
|
||||
@@ -8632,7 +8632,7 @@ void resolve_const_item(THD *thd, Item **ref, Item *comp_item)
|
||||
uint col;
|
||||
new_item= 0;
|
||||
/*
|
||||
If item and comp_item are both Item_rows and have same number of cols
|
||||
If item and comp_item are both Item_row's and have same number of cols
|
||||
then process items in Item_row one by one.
|
||||
We can't ignore NULL values here as this item may be used with <=>, in
|
||||
which case NULL's are significant.
|
||||
|
||||
14
sql/item.h
14
sql/item.h
@@ -33,6 +33,7 @@ C_MODE_START
|
||||
#include <ma_dyncol.h>
|
||||
C_MODE_END
|
||||
|
||||
#ifndef DBUG_OFF
|
||||
static inline
|
||||
bool trace_unsupported_func(const char *where, const char *processor_name)
|
||||
{
|
||||
@@ -43,6 +44,9 @@ bool trace_unsupported_func(const char *where, const char *processor_name)
|
||||
DBUG_PRINT("info", ("%s", buff));
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
#else
|
||||
#define trace_unsupported_func(X,Y) TRUE
|
||||
#endif
|
||||
|
||||
static inline
|
||||
bool trace_unsupported_by_check_vcol_func_processor(const char *where)
|
||||
@@ -730,7 +734,7 @@ public:
|
||||
bool unsigned_flag;
|
||||
bool with_sum_func; /* True if item contains a sum func */
|
||||
/**
|
||||
True if any item except Item_sum_func contains a field. Set during parsing.
|
||||
True if any item except Item_sum contains a field. Set during parsing.
|
||||
*/
|
||||
bool with_field;
|
||||
bool fixed; /* If item fixed with fix_fields */
|
||||
@@ -1207,7 +1211,7 @@ public:
|
||||
The method allows to determine nullness of a complex expression
|
||||
without fully evaluating it, instead of calling val/result*() then
|
||||
checking null_value. Used in Item_func_isnull/Item_func_isnotnull
|
||||
and Item_sum_count/Item_sum_count_distinct.
|
||||
and Item_sum_count.
|
||||
Any new item which can be NULL must implement this method.
|
||||
*/
|
||||
virtual bool is_null() { return 0; }
|
||||
@@ -2718,7 +2722,6 @@ class Item_float :public Item_num
|
||||
char *presentation;
|
||||
public:
|
||||
double value;
|
||||
// Item_real() :value(0) {}
|
||||
Item_float(const char *str_arg, uint length);
|
||||
Item_float(const char *str,double val_arg,uint decimal_par,uint length)
|
||||
:value(val_arg)
|
||||
@@ -3390,7 +3393,7 @@ public:
|
||||
should not be used for runtime type identification, use enum
|
||||
{Sum}Functype and Item_func::functype()/Item_sum::sum_func()
|
||||
instead.
|
||||
Added here, to the parent class of both Item_func and Item_sum_func.
|
||||
Added here, to the parent class of both Item_func and Item_sum.
|
||||
|
||||
NOTE: for Items inherited from Item_sum, func_name() return part of
|
||||
function name till first argument (including '(') to make difference in
|
||||
@@ -4498,7 +4501,8 @@ private:
|
||||
BEFORE INSERT of BEFORE UPDATE trigger.
|
||||
*/
|
||||
bool read_only;
|
||||
virtual bool check_vcol_func_processor(uchar *arg)
|
||||
public:
|
||||
bool check_vcol_func_processor(uchar *arg)
|
||||
{
|
||||
return trace_unsupported_by_check_vcol_func_processor("trigger");
|
||||
}
|
||||
|
||||
@@ -1575,7 +1575,7 @@ bool Item_in_optimizer::invisible_mode()
|
||||
@details
|
||||
The function checks whether an expression cache is needed for this item
|
||||
and if if so wraps the item into an item of the class
|
||||
Item_exp_cache_wrapper with an appropriate expression cache set up there.
|
||||
Item_cache_wrapper with an appropriate expression cache set up there.
|
||||
|
||||
@note
|
||||
used from Item::transform()
|
||||
|
||||
@@ -424,7 +424,7 @@ Item *Item_func::compile(Item_analyzer analyzer, uchar **arg_p,
|
||||
}
|
||||
|
||||
/**
|
||||
See comments in Item_cmp_func::split_sum_func()
|
||||
See comments in Item_cond::split_sum_func()
|
||||
*/
|
||||
|
||||
void Item_func::split_sum_func(THD *thd, Item **ref_pointer_array,
|
||||
@@ -2115,7 +2115,7 @@ void Item_func_neg::fix_length_and_dec()
|
||||
If this is in integer context keep the context as integer if possible
|
||||
(This is how multiplication and other integer functions works)
|
||||
Use val() to get value as arg_type doesn't mean that item is
|
||||
Item_int or Item_real due to existence of Item_param.
|
||||
Item_int or Item_float due to existence of Item_param.
|
||||
*/
|
||||
if (cached_result_type == INT_RESULT && args[0]->const_item())
|
||||
{
|
||||
|
||||
@@ -790,7 +790,7 @@ inline bool Item_in_subselect::left_expr_has_null()
|
||||
|
||||
@note
|
||||
This method allows many columns in the subquery because it is supported by
|
||||
Item_in optimizer and result of the IN subquery will be scalar in this
|
||||
Item_in_optimizer and result of the IN subquery will be scalar in this
|
||||
case.
|
||||
|
||||
@retval TRUE cache is needed
|
||||
@@ -1180,7 +1180,7 @@ void Item_singlerow_subselect::fix_length_and_dec()
|
||||
@details
|
||||
The function checks whether an expression cache is needed for this item
|
||||
and if if so wraps the item into an item of the class
|
||||
Item_exp_cache_wrapper with an appropriate expression cache set up there.
|
||||
Item_cache_wrapper with an appropriate expression cache set up there.
|
||||
|
||||
@note
|
||||
used from Item::transform()
|
||||
@@ -1473,7 +1473,7 @@ void Item_in_subselect::fix_length_and_dec()
|
||||
@details
|
||||
The function checks whether an expression cache is needed for this item
|
||||
and if if so wraps the item into an item of the class
|
||||
Item_exp_cache_wrapper with an appropriate expression cache set up there.
|
||||
Item_cache_wrapper with an appropriate expression cache set up there.
|
||||
|
||||
@note
|
||||
used from Item::transform()
|
||||
@@ -1810,7 +1810,7 @@ Item_in_subselect::single_value_transformer(JOIN *join)
|
||||
optimizer->keep_top_level_cache();
|
||||
|
||||
/*
|
||||
As far as Item_ref_in_optimizer do not substitute itself on fix_fields
|
||||
As far as Item_in_optimizer does not substitute itself on fix_fields
|
||||
we can use same item for all selects.
|
||||
*/
|
||||
expr= new Item_direct_ref(&select_lex->context,
|
||||
|
||||
@@ -551,9 +551,9 @@ class Unique;
|
||||
/**
|
||||
The distinct aggregator.
|
||||
Implements AGGFN (DISTINCT ..)
|
||||
Collects all the data into an Unique (similarly to what Item_sum_distinct
|
||||
does currently) and then (if applicable) iterates over the list of
|
||||
unique values and pumps them back into its object
|
||||
Collects all the data into an Unique (similarly to what Item_sum
|
||||
does currently when with_distinct=true) and then (if applicable) iterates over
|
||||
the list of unique values and pumps them back into its object
|
||||
*/
|
||||
|
||||
class Aggregator_distinct : public Aggregator
|
||||
|
||||
@@ -1095,7 +1095,7 @@ void Item_func_dayname::fix_length_and_dec()
|
||||
String* Item_func_dayname::val_str(String* str)
|
||||
{
|
||||
DBUG_ASSERT(fixed == 1);
|
||||
uint weekday=(uint) val_int(); // Always Item_func_daynr()
|
||||
uint weekday=(uint) val_int(); // Always Item_func_weekday()
|
||||
const char *day_name;
|
||||
uint err;
|
||||
|
||||
@@ -2064,7 +2064,7 @@ void Item_date_add_interval::fix_length_and_dec()
|
||||
enum_field_types arg0_field_type;
|
||||
|
||||
/*
|
||||
The field type for the result of an Item_date function is defined as
|
||||
The field type for the result of an Item_datefunc is defined as
|
||||
follows:
|
||||
|
||||
- If first arg is a MYSQL_TYPE_DATETIME result is MYSQL_TYPE_DATETIME
|
||||
@@ -2118,8 +2118,6 @@ void Item_date_add_interval::fix_length_and_dec()
|
||||
}
|
||||
|
||||
|
||||
/* Here arg[1] is a Item_interval object */
|
||||
|
||||
bool Item_date_add_interval::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
|
||||
{
|
||||
INTERVAL interval;
|
||||
|
||||
@@ -6921,12 +6921,12 @@ find_item_in_list(Item *find, List<Item> &items, uint *counter,
|
||||
{
|
||||
/*
|
||||
TODO:Here we process prefixed view references only. What we should
|
||||
really do is process all types of Item_refs. But this will currently
|
||||
really do is process all types of Item_ref's. But this will currently
|
||||
lead to a clash with the way references to outer SELECTs (from the
|
||||
HAVING clause) are handled in e.g. :
|
||||
SELECT 1 FROM t1 AS t1_o GROUP BY a
|
||||
HAVING (SELECT t1_o.a FROM t1 AS t1_i GROUP BY t1_i.a LIMIT 1).
|
||||
Processing all Item_refs here will cause t1_o.a to resolve to itself.
|
||||
Processing all Item_ref's here will cause t1_o.a to resolve to itself.
|
||||
We still need to process the special case of Item_direct_view_ref
|
||||
because in the context of views they have the same meaning as
|
||||
Item_field for tables.
|
||||
|
||||
@@ -960,7 +960,7 @@ bool mysql_derived_reinit(THD *thd, LEX *lex, TABLE_LIST *derived)
|
||||
derived->merged_for_insert= FALSE;
|
||||
unit->unclean();
|
||||
unit->types.empty();
|
||||
/* for derived tables & PS (which can't be reset by Item_subquery) */
|
||||
/* for derived tables & PS (which can't be reset by Item_subselect) */
|
||||
unit->reinit_exec_mechanism();
|
||||
unit->set_thd(thd);
|
||||
DBUG_RETURN(FALSE);
|
||||
|
||||
@@ -2597,7 +2597,7 @@ void reinit_stmt_before_use(THD *thd, LEX *lex)
|
||||
SELECT_LEX_UNIT *unit= sl->master_unit();
|
||||
unit->unclean();
|
||||
unit->types.empty();
|
||||
/* for derived tables & PS (which can't be reset by Item_subquery) */
|
||||
/* for derived tables & PS (which can't be reset by Item_subselect) */
|
||||
unit->reinit_exec_mechanism();
|
||||
unit->set_thd(thd);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user