MySQL 5.6.14 Source Code Document
|
Public Member Functions | |
Item_func_group_concat (Name_resolution_context *context_arg, bool is_distinct, List< Item > *is_select, const SQL_I_List< ORDER > &is_order, String *is_separator) | |
Item_func_group_concat (THD *thd, Item_func_group_concat *item) | |
void | cleanup () |
enum Sumfunctype | sum_func () const |
const char * | func_name () const |
virtual Item_result | result_type () const |
virtual Field * | make_string_field (TABLE *table) |
enum_field_types | field_type () const |
void | clear () |
bool | add () |
void | reset_field () |
void | update_field () |
bool | fix_fields (THD *, Item **) |
bool | setup (THD *thd) |
void | make_unique () |
double | val_real () |
longlong | val_int () |
my_decimal * | val_decimal (my_decimal *decimal_value) |
bool | get_date (MYSQL_TIME *ltime, uint fuzzydate) |
bool | get_time (MYSQL_TIME *ltime) |
String * | val_str (String *str) |
Item * | copy_or_same (THD *thd) |
void | no_rows_in_result () |
virtual void | print (String *str, enum_query_type query_type) |
virtual bool | change_context_processor (uchar *cntx) |
Public Member Functions inherited from Item_sum | |
bool | has_force_copy_fields () const |
bool | has_with_distinct () const |
void | mark_as_sum_func () |
Item_sum (Item *a) | |
Item_sum (Item *a, Item *b) | |
Item_sum (List< Item > &list) | |
Item_sum (THD *thd, Item_sum *item) | |
enum Type | type () const |
bool | reset_and_add () |
virtual bool | keep_field_type (void) const |
virtual void | fix_length_and_dec () |
virtual Item * | result_item (Field *field) |
table_map | used_tables () const |
void | update_used_tables () |
bool | is_null () |
void | make_const () |
virtual bool | const_item () const |
virtual bool | const_during_execution () const |
void | fix_num_length_and_dec () |
Item * | get_tmp_table_item (THD *thd) |
virtual Field * | create_tmp_field (bool group, TABLE *table) |
bool | walk (Item_processor processor, bool walk_subquery, uchar *argument) |
virtual bool | clean_up_after_removal (uchar *arg) |
bool | init_sum_func_check (THD *thd) |
bool | check_sum_func (THD *thd, Item **ref) |
bool | register_sum_func (THD *thd, Item **ref) |
st_select_lex * | depended_from () |
Item * | get_arg (uint i) |
Item * | set_arg (uint i, THD *thd, Item *new_val) |
uint | get_arg_count () |
void | init_aggregator () |
bool | aggregator_setup (THD *thd) |
void | aggregator_clear () |
bool | aggregator_add () |
void | set_distinct (bool distinct) |
int | set_aggregator (Aggregator::Aggregator_type aggregator) |
Public Member Functions inherited from Item_result_field | |
Item_result_field (THD *thd, Item_result_field *item) | |
Field * | get_tmp_table_field () |
Field * | tmp_table_field (TABLE *t_arg) |
void | set_result_field (Field *field) |
bool | is_result_field () |
void | save_in_result_field (bool no_conversions) |
Public Member Functions inherited from Item | |
Item (THD *thd, Item *item) | |
void | rename (char *new_name) |
void | init_make_field (Send_field *tmp_field, enum enum_field_types type) |
virtual void | make_field (Send_field *field) |
virtual void | fix_after_pullout (st_select_lex *parent_select, st_select_lex *removed_select) |
void | quick_fix_field () |
type_conversion_status | save_in_field_no_warnings (Field *field, bool no_conversions) |
virtual type_conversion_status | save_in_field (Field *field, bool no_conversions) |
virtual void | save_org_in_field (Field *field) |
virtual type_conversion_status | save_safe_in_field (Field *field) |
virtual bool | send (Protocol *protocol, String *str) |
virtual bool | eq (const Item *, bool binary_cmp) const |
virtual enum Item_result | numeric_context_result_type () const |
enum Item_result | temporal_with_date_as_number_result_type () const |
virtual Item_result | cast_to_int_type () const |
virtual enum_field_types | string_field_type () const |
virtual enum_monotonicity_info | get_monotonicity_info () const |
virtual longlong | val_int_endpoint (bool left_endp, bool *incl_endp) |
virtual longlong | val_date_temporal () |
virtual longlong | val_time_temporal () |
longlong | val_temporal_by_field_type () |
longlong | val_temporal_with_round (enum_field_types type, uint8 dec) |
ulonglong | val_uint () |
virtual String * | val_str_ascii (String *str) |
virtual bool | val_bool () |
virtual String * | val_nodeset (String *) |
type_conversion_status | save_time_in_field (Field *field) |
type_conversion_status | save_date_in_field (Field *field) |
type_conversion_status | save_str_value_in_field (Field *field, String *result) |
virtual const char * | full_name () const |
virtual double | val_result () |
virtual longlong | val_int_result () |
virtual longlong | val_time_temporal_result () |
virtual longlong | val_date_temporal_result () |
virtual String * | str_result (String *tmp) |
virtual my_decimal * | val_decimal_result (my_decimal *val) |
virtual bool | val_bool_result () |
virtual bool | is_null_result () |
virtual table_map | resolved_used_tables () const |
virtual table_map | not_null_tables () const |
virtual bool | basic_const_item () const |
virtual Item * | clone_item () |
virtual cond_result | eq_cmp_result () const |
uint | float_length (uint decimals_par) const |
virtual uint | decimal_precision () const |
int | decimal_int_part () const |
virtual uint | time_precision () |
virtual uint | datetime_precision () |
void | print_item_w_name (String *, enum_query_type query_type) |
void | print_for_order (String *str, enum_query_type query_type, bool used_alias) |
virtual void | split_sum_func (THD *thd, Ref_ptr_array ref_pointer_array, List< Item > &fields) |
void | split_sum_func2 (THD *thd, Ref_ptr_array ref_pointer_array, List< Item > &fields, Item **ref, bool skip_registered) |
virtual bool | get_timeval (struct timeval *tm, int *warnings) |
virtual bool | get_date_result (MYSQL_TIME *ltime, uint fuzzydate) |
virtual void | update_null_value () |
virtual void | top_level_item () |
virtual bool | is_bool_func () |
virtual Item * | copy_andor_structure (THD *thd, bool real_items=false) |
virtual Item * | real_item () |
virtual const CHARSET_INFO * | compare_collation () |
virtual const CHARSET_INFO * | charset_for_protocol (void) const |
virtual Item * | transform (Item_transformer transformer, uchar *arg) |
virtual Item * | compile (Item_analyzer analyzer, uchar **arg_p, Item_transformer transformer, uchar *arg_t) |
virtual void | traverse_cond (Cond_traverser traverser, void *arg, traverse_order order) |
virtual bool | intro_version (uchar *int_arg) |
virtual bool | remove_dependence_processor (uchar *arg) |
virtual bool | remove_fixed (uchar *arg) |
virtual bool | cleanup_processor (uchar *arg) |
virtual bool | collect_item_field_processor (uchar *arg) |
virtual bool | add_field_to_set_processor (uchar *arg) |
virtual bool | remove_column_from_bitmap (uchar *arg) |
virtual bool | find_item_in_field_list_processor (uchar *arg) |
virtual bool | reset_query_id_processor (uchar *query_id_arg) |
virtual bool | find_item_processor (uchar *arg) |
virtual bool | register_field_in_read_map (uchar *arg) |
virtual bool | inform_item_in_cond_of_tab (uchar *join_tab_index) |
virtual bool | cache_const_expr_analyzer (uchar **arg) |
virtual Item * | cache_const_expr_transformer (uchar *arg) |
virtual bool | item_field_by_name_analyzer (uchar **arg) |
virtual Item * | item_field_by_name_transformer (uchar *arg) |
virtual bool | equality_substitution_analyzer (uchar **arg) |
virtual Item * | equality_substitution_transformer (uchar *arg) |
virtual bool | check_partition_func_processor (uchar *bool_arg) |
virtual bool | subst_argument_checker (uchar **arg) |
virtual bool | explain_subquery_checker (uchar **arg) |
virtual Item * | explain_subquery_propagator (uchar *arg) |
virtual Item * | equal_fields_propagator (uchar *arg) |
virtual bool | set_no_const_sub (uchar *arg) |
virtual Item * | replace_equal_field (uchar *arg) |
virtual bool | check_valid_arguments_processor (uchar *bool_arg) |
virtual bool | find_function_processor (uchar *arg) |
virtual Item * | this_item () |
virtual const Item * | this_item () const |
virtual Item ** | this_item_addr (THD *thd, Item **addr_arg) |
virtual uint | cols () |
virtual Item * | element_index (uint i) |
virtual Item ** | addr (uint i) |
virtual bool | check_cols (uint c) |
virtual bool | null_inside () |
virtual void | bring_value () |
Field * | tmp_table_field_from_field_type (TABLE *table, bool fixed_length) |
virtual Item_field * | field_for_view_update () |
virtual Item * | neg_transformer (THD *thd) |
virtual Item * | update_value_transformer (uchar *select_arg) |
virtual Item * | safe_charset_converter (const CHARSET_INFO *tocs) |
void | delete_self () |
virtual bool | is_splocal () |
virtual Settable_routine_parameter * | get_settable_routine_parameter () |
bool | is_temporal_with_date () const |
bool | is_temporal_with_date_and_time () const |
bool | is_temporal_with_time () const |
bool | is_temporal () const |
bool | has_compatible_context (Item *item) const |
virtual Field::geometry_type | get_geometry_type () const |
String * | check_well_formed_result (String *str, bool send_error=0) |
bool | eq_by_collation (Item *item, bool binary_cmp, const CHARSET_INFO *cs) |
virtual bool | is_expensive () |
virtual bool | can_be_evaluated_now () const |
uint32 | max_char_length () const |
void | fix_length_and_charset (uint32 max_char_length_arg, const CHARSET_INFO *cs) |
void | fix_char_length (uint32 max_char_length_arg) |
void | fix_char_length_ulonglong (ulonglong max_char_length_arg) |
void | fix_length_and_charset_datetime (uint32 max_char_length_arg) |
void | fix_length_and_dec_and_charset_datetime (uint32 max_char_length_arg, uint8 dec_arg) |
virtual bool | is_outer_field () const |
bool | is_blob_field () const |
virtual bool | has_subquery () const |
virtual bool | has_stored_program () const |
virtual bool | created_by_in2exists () const |
Whether this Item was created by the IN->EXISTS subquery transformation. |
Friends | |
int | group_concat_key_cmp_with_distinct (const void *arg, const void *key1, const void *key2) |
int | group_concat_key_cmp_with_order (const void *arg, const void *key1, const void *key2) |
int | dump_leaf_key (void *key_arg, element_count count __attribute__((unused)), void *item_arg) |
Additional Inherited Members | |
Public Types inherited from Item_sum | |
enum | Sumfunctype { COUNT_FUNC, COUNT_DISTINCT_FUNC, SUM_FUNC, SUM_DISTINCT_FUNC, AVG_FUNC, AVG_DISTINCT_FUNC, MIN_FUNC, MAX_FUNC, STD_FUNC, VARIANCE_FUNC, SUM_BIT_FUNC, UDF_SUM_FUNC, GROUP_CONCAT_FUNC } |
Static Public Member Functions inherited from Item | |
static void * | operator new (size_t size) throw () |
static void * | operator new (size_t size, MEM_ROOT *mem_root) throw () |
static void | operator delete (void *ptr, size_t size) |
static void | operator delete (void *ptr, MEM_ROOT *mem_root) |
static const CHARSET_INFO * | default_charset () |
Public Attributes inherited from Item_sum | |
Item ** | ref_by |
Item_sum * | next |
Item_sum * | in_sum_func |
st_select_lex * | aggr_sel |
int8 | nest_level |
int8 | aggr_level |
int8 | max_arg_level |
int8 | max_sum_func_level |
bool | quick_group |
List< Item_field > | outer_fields |
Protected Member Functions inherited from Item | |
String * | val_string_from_real (String *str) |
String * | val_string_from_int (String *str) |
String * | val_string_from_decimal (String *str) |
String * | val_string_from_date (String *str) |
String * | val_string_from_datetime (String *str) |
String * | val_string_from_time (String *str) |
my_decimal * | val_decimal_from_real (my_decimal *decimal_value) |
my_decimal * | val_decimal_from_int (my_decimal *decimal_value) |
my_decimal * | val_decimal_from_string (my_decimal *decimal_value) |
my_decimal * | val_decimal_from_date (my_decimal *decimal_value) |
my_decimal * | val_decimal_from_time (my_decimal *decimal_value) |
longlong | val_int_from_decimal () |
longlong | val_int_from_date () |
longlong | val_int_from_time () |
longlong | val_int_from_datetime () |
double | val_real_from_decimal () |
bool | get_date_from_string (MYSQL_TIME *ltime, uint flags) |
bool | get_date_from_real (MYSQL_TIME *ltime, uint flags) |
bool | get_date_from_decimal (MYSQL_TIME *ltime, uint flags) |
bool | get_date_from_int (MYSQL_TIME *ltime, uint flags) |
bool | get_date_from_time (MYSQL_TIME *ltime) |
bool | get_date_from_numeric (MYSQL_TIME *ltime, uint fuzzydate) |
bool | get_date_from_non_temporal (MYSQL_TIME *ltime, uint fuzzydate) |
bool | get_time_from_string (MYSQL_TIME *ltime) |
bool | get_time_from_real (MYSQL_TIME *ltime) |
bool | get_time_from_decimal (MYSQL_TIME *ltime) |
bool | get_time_from_int (MYSQL_TIME *ltime) |
bool | get_time_from_date (MYSQL_TIME *ltime) |
bool | get_time_from_datetime (MYSQL_TIME *ltime) |
bool | get_time_from_numeric (MYSQL_TIME *ltime) |
bool | get_time_from_non_temporal (MYSQL_TIME *ltime) |
Static Protected Member Functions inherited from Item_sum | |
static ulonglong | ram_limitation (THD *thd) |
Protected Attributes inherited from Item_sum | |
Aggregator * | aggr |
uint | arg_count |
Item ** | args |
Item * | tmp_args [2] |
Item ** | orig_args |
Item * | tmp_orig_args [2] |
table_map | used_tables_cache |
bool | forced_const |
Definition at line 1416 of file item_sum.h.
Item_func_group_concat::Item_func_group_concat | ( | Name_resolution_context * | context_arg, |
bool | distinct_arg, | ||
List< Item > * | select_list, | ||
const SQL_I_List< ORDER > & | order_list, | ||
String * | separator_arg | ||
) |
Constructor of Item_func_group_concat.
distinct_arg | distinct |
select_list | list of expression for show values |
order_list | list of sort columns |
separator_arg | string value of separator. |
Definition at line 3112 of file item_sum.cc.
Create a field to hold a string value from an item.
If max_length > CONVERT_IF_BIGGER_TO_BLOB create a blob
If max_length > 0 create a varchar
If max_length == 0 create a CHAR(0)
table | Table for which the field is created |
Reimplemented from Item.
Definition at line 3258 of file item_sum.cc.
|
inlinevirtual |
Mark an aggregate as having no rows.
This function is called by the execution engine to assign 'NO ROWS FOUND' value to an aggregate item, when the underlying result set has no rows. Such value, in a general case, may be different from the default value of the item after 'clear()': e.g. a numeric item may be initialized to 0 by clear() and to NULL by no_rows_in_result().
Reimplemented from Item_sum.
Definition at line 1517 of file item_sum.h.
|
virtual |
This method is used for to:
For more information about view definition query, INFORMATION_SCHEMA query and why they should be generated from the Item-tree,
Reimplemented from Item_sum.
Definition at line 3580 of file item_sum.cc.
|
virtual |
Initialize blob_storage if GROUP_CONCAT is used with ORDER BY | DISTINCT and BLOB field count > 0.
Reimplemented from Item_sum.
Definition at line 3425 of file item_sum.cc.
|
friend |
Append data from current leaf to item->result.
To avoid duplicated warnings in Item_func_group_concat::val_str()
Definition at line 3017 of file item_sum.cc.
|
friend |
Compares the values for fields in expr list of GROUP_CONCAT.
GROUP_CONCAT([DISTINCT] expr [,expr ...] [ORDER BY {unsigned_integer | col_name | expr} [ASC | DESC] [,col_name ...]] [SEPARATOR str_val])
-1 | : key1 < key2 |
0 | : key1 = key2 |
1 | : key1 > key2 |
Definition at line 2931 of file item_sum.cc.
|
friend |
function of sort for syntax: GROUP_CONCAT(expr,... ORDER BY col,... )
Definition at line 2970 of file item_sum.cc.