#include <item.h>
Collaboration diagram for DTCollation:

Public Member Functions | |
| DTCollation () | |
| DTCollation (CHARSET_INFO *collation_arg, Derivation derivation_arg) | |
| void | set (DTCollation &dt) |
| void | set (CHARSET_INFO *collation_arg, Derivation derivation_arg) |
| void | set (CHARSET_INFO *collation_arg) |
| void | set (Derivation derivation_arg) |
| bool | aggregate (DTCollation &dt, uint flags=0) |
| bool | set (DTCollation &dt1, DTCollation &dt2, uint flags=0) |
| const char * | derivation_name () const |
Public Attributes | |
| CHARSET_INFO * | collation |
| enum Derivation | derivation |
Definition at line 61 of file item.h.
| DTCollation::DTCollation | ( | ) | [inline] |
Definition at line 66 of file item.h.
References collation, derivation, DERIVATION_NONE, and my_charset_bin.
00067 { 00068 collation= &my_charset_bin; 00069 derivation= DERIVATION_NONE; 00070 }
| DTCollation::DTCollation | ( | CHARSET_INFO * | collation_arg, | |
| Derivation | derivation_arg | |||
| ) | [inline] |
Definition at line 71 of file item.h.
References collation, and derivation.
00072 { 00073 collation= collation_arg; 00074 derivation= derivation_arg; 00075 }
| bool DTCollation::aggregate | ( | DTCollation & | dt, | |
| uint | flags = 0 | |||
| ) |
Definition at line 1229 of file item.cc.
References collation, charset_info_st::csname, derivation, DERIVATION_EXPLICIT, DERIVATION_NONE, DERIVATION_SYSCONST, get_charset_by_csname(), my_charset_bin, my_charset_same(), MY_COLL_ALLOW_COERCIBLE_CONV, MY_COLL_ALLOW_SUPERSET_CONV, MY_CS_BINSORT, MY_CS_UNICODE, MYF, set(), and charset_info_st::state.
Referenced by agg_item_collations(), Item_type_holder::join_types(), and set().
01230 { 01231 if (!my_charset_same(collation, dt.collation)) 01232 { 01233 /* 01234 We do allow to use binary strings (like BLOBS) 01235 together with character strings. 01236 Binaries have more precedence than a character 01237 string of the same derivation. 01238 */ 01239 if (collation == &my_charset_bin) 01240 { 01241 if (derivation <= dt.derivation) 01242 ; // Do nothing 01243 else 01244 { 01245 set(dt); 01246 } 01247 } 01248 else if (dt.collation == &my_charset_bin) 01249 { 01250 if (dt.derivation <= derivation) 01251 { 01252 set(dt); 01253 } 01254 else 01255 ; // Do nothing 01256 } 01257 else if ((flags & MY_COLL_ALLOW_SUPERSET_CONV) && 01258 collation->state & MY_CS_UNICODE && 01259 (derivation < dt.derivation || 01260 (derivation == dt.derivation && 01261 !(dt.collation->state & MY_CS_UNICODE)))) 01262 { 01263 // Do nothing 01264 } 01265 else if ((flags & MY_COLL_ALLOW_SUPERSET_CONV) && 01266 dt.collation->state & MY_CS_UNICODE && 01267 (dt.derivation < derivation || 01268 (dt.derivation == derivation && 01269 !(collation->state & MY_CS_UNICODE)))) 01270 { 01271 set(dt); 01272 } 01273 else if ((flags & MY_COLL_ALLOW_COERCIBLE_CONV) && 01274 derivation < dt.derivation && 01275 dt.derivation >= DERIVATION_SYSCONST) 01276 { 01277 // Do nothing; 01278 } 01279 else if ((flags & MY_COLL_ALLOW_COERCIBLE_CONV) && 01280 dt.derivation < derivation && 01281 derivation >= DERIVATION_SYSCONST) 01282 { 01283 set(dt); 01284 } 01285 else 01286 { 01287 // Cannot apply conversion 01288 set(0, DERIVATION_NONE); 01289 return 1; 01290 } 01291 } 01292 else if (derivation < dt.derivation) 01293 { 01294 // Do nothing 01295 } 01296 else if (dt.derivation < derivation) 01297 { 01298 set(dt); 01299 } 01300 else 01301 { 01302 if (collation == dt.collation) 01303 { 01304 // Do nothing 01305 } 01306 else 01307 { 01308 if (derivation == DERIVATION_EXPLICIT) 01309 { 01310 set(0, DERIVATION_NONE); 01311 return 1; 01312 } 01313 if (collation->state & MY_CS_BINSORT) 01314 return 0; 01315 if (dt.collation->state & MY_CS_BINSORT) 01316 { 01317 set(dt); 01318 return 0; 01319 } 01320 CHARSET_INFO *bin= get_charset_by_csname(collation->csname, 01321 MY_CS_BINSORT,MYF(0)); 01322 set(bin, DERIVATION_NONE); 01323 } 01324 } 01325 return 0; 01326 }
Here is the call graph for this function:

Here is the caller graph for this function:

| const char* DTCollation::derivation_name | ( | ) | const [inline] |
Definition at line 93 of file item.h.
References derivation, DERIVATION_COERCIBLE, DERIVATION_EXPLICIT, DERIVATION_IGNORABLE, DERIVATION_IMPLICIT, DERIVATION_NONE, and DERIVATION_SYSCONST.
Referenced by Item_type_holder::join_types(), and my_coll_agg_error().
00094 { 00095 switch(derivation) 00096 { 00097 case DERIVATION_IGNORABLE: return "IGNORABLE"; 00098 case DERIVATION_COERCIBLE: return "COERCIBLE"; 00099 case DERIVATION_IMPLICIT: return "IMPLICIT"; 00100 case DERIVATION_SYSCONST: return "SYSCONST"; 00101 case DERIVATION_EXPLICIT: return "EXPLICIT"; 00102 case DERIVATION_NONE: return "NONE"; 00103 default: return "UNKNOWN"; 00104 } 00105 }
Here is the caller graph for this function:

| bool DTCollation::set | ( | DTCollation & | dt1, | |
| DTCollation & | dt2, | |||
| uint | flags = 0 | |||
| ) | [inline] |
| void DTCollation::set | ( | Derivation | derivation_arg | ) | [inline] |
| void DTCollation::set | ( | CHARSET_INFO * | collation_arg | ) | [inline] |
| void DTCollation::set | ( | CHARSET_INFO * | collation_arg, | |
| Derivation | derivation_arg | |||
| ) | [inline] |
Definition at line 81 of file item.h.
References collation, and derivation.
00082 { 00083 collation= collation_arg; 00084 derivation= derivation_arg; 00085 }
| void DTCollation::set | ( | DTCollation & | dt | ) | [inline] |
Definition at line 76 of file item.h.
References collation, and derivation.
Referenced by agg_item_collations(), aggregate(), Item_param::convert_str_value(), Item_sum_hybrid::fix_fields(), Item_func_set_user_var::fix_fields(), Item_sp_variable::fix_fields(), Item_date_typecast::fix_length_and_dec(), Item_typecast_maybe_null::fix_length_and_dec(), Item_typecast::fix_length_and_dec(), Item_func_sec_to_time::fix_length_and_dec(), Item_date::fix_length_and_dec(), Item_func_dayname::fix_length_and_dec(), Item_func_weekday::fix_length_and_dec(), Item_func_monthname::fix_length_and_dec(), Item_func_month::fix_length_and_dec(), Item_char_typecast::fix_length_and_dec(), Item_date_add_interval::fix_length_and_dec(), Item_func_convert_tz::fix_length_and_dec(), Item_func_from_unixtime::fix_length_and_dec(), Item_func_date_format::fix_length_and_dec(), Item_func_sysdate_local::fix_length_and_dec(), Item_func_now::fix_length_and_dec(), Item_func_curtime::fix_length_and_dec(), Item_func_curdate::fix_length_and_dec(), subselect_union_engine::fix_length_and_dec(), subselect_single_select_engine::fix_length_and_dec(), Item_func_uuid::fix_length_and_dec(), Item_func_collation::fix_length_and_dec(), Item_func_charset::fix_length_and_dec(), Item_func_quote::fix_length_and_dec(), Item_load_file::fix_length_and_dec(), Item_func_binary::fix_length_and_dec(), Item_func_unhex::fix_length_and_dec(), Item_func_hex::fix_length_and_dec(), Item_func_conv::fix_length_and_dec(), Item_func_format::fix_length_and_dec(), Item_func_ucase::fix_length_and_dec(), Item_func_lcase::fix_length_and_dec(), Item_func_set_collation::fix_length_and_dec(), Item_func_conv_charset::fix_length_and_dec(), Item_func_repeat::fix_length_and_dec(), Item_func_soundex::fix_length_and_dec(), Item_func_encode::fix_length_and_dec(), Item_func_trim::fix_length_and_dec(), Item_func_substr::fix_length_and_dec(), Item_func_right::fix_length_and_dec(), Item_func_left::fix_length_and_dec(), Item_func_reverse::fix_length_and_dec(), Item_func_sha::fix_length_and_dec(), Item_func_md5::fix_length_and_dec(), Item_func_sp::fix_length_and_dec(), Item_func_get_user_var::fix_length_and_dec(), Item_func_set_user_var::fix_length_and_dec(), Item_func_if::fix_length_and_dec(), sys_var::item(), Item_bin_string::Item_bin_string(), Item_field::Item_field(), Item_func_char::Item_func_char(), Item_func_sysconst::Item_func_sysconst(), Item_hex_string::Item_hex_string(), Item_null::Item_null(), Item_string::Item_string(), Item_sum_hybrid::Item_sum_hybrid(), Item_type_holder::Item_type_holder(), Item_param::reset(), Item_null::safe_charset_converter(), set(), Arg_comparator::set_compare_func(), Item_field::set_field(), Item_ref::set_properties(), and Item_cache::setup().
00077 { 00078 collation= dt.collation; 00079 derivation= dt.derivation; 00080 }
Here is the caller graph for this function:

Definition at line 63 of file item.h.
Referenced by field_str::add(), Item_sum_max::add(), Item_sum_min::add(), agg_item_charsets(), aggregate(), change_cond_ref_to_const(), Cached_item_str::cmp(), Item_equal::compare_collation(), Item_func_isnotnull::compare_collation(), Item_func_isnull::compare_collation(), Item_func_in::compare_collation(), Item_func_case::compare_collation(), Item_func_between::compare_collation(), Item_bool_func2::compare_collation(), Arg_comparator::compare_e_string(), Arg_comparator::compare_string(), Item_sum_hybrid::create_tmp_field(), Item_sum::create_tmp_field(), create_tmp_field_for_schema(), create_tmp_field_from_item(), DTCollation(), Item_func_set_collation::eq(), Item_hex_string::eq(), Item_param::eq(), Item_string::eq(), Item_func_group_concat::field_type(), Item_func_case::find_item(), Item_func_set_user_var::fix_fields(), Item_func_like::fix_fields(), Item_sp_variable::fix_fields(), Item_xml_str_func::fix_length_and_dec(), Item_nodeset_func::fix_length_and_dec(), Item_char_typecast::fix_length_and_dec(), Item_func_collation::fix_length_and_dec(), Item_func_charset::fix_length_and_dec(), Item_func_hex::fix_length_and_dec(), Item_func_char::fix_length_and_dec(), Item_func_format::fix_length_and_dec(), Item_func_ucase::fix_length_and_dec(), Item_func_lcase::fix_length_and_dec(), Item_func_set_collation::fix_length_and_dec(), Item_func_lpad::fix_length_and_dec(), Item_func_rpad::fix_length_and_dec(), Item_func_trim::fix_length_and_dec(), Item_func_substr::fix_length_and_dec(), Item_func_concat::fix_length_and_dec(), Item_func_sha::fix_length_and_dec(), Item_func_md5::fix_length_and_dec(), Item_func_set_user_var::fix_length_and_dec(), Item_equal::fix_length_and_dec(), Item_func_in::fix_length_and_dec(), Item_func_if::fix_length_and_dec(), field_str::get_opt_type(), Item::init_make_field(), Item_func_match::init_search(), Item_func_conv_charset::Item_func_conv_charset(), Item_type_holder::join_types(), Item_str_func::left_right_max_length(), Item_type_holder::make_field_by_type(), make_sortkey(), Item::make_string_field(), Item_sum_hybrid::min_max_update_str_field(), my_coll_agg_error(), mysql_prepare_table(), Item_string::new_item(), Item_string::print(), Item_hex_string::save_in_field(), Item_string::save_in_field(), Item::save_in_field(), Item_copy_string::save_in_field(), Protocol::send_fields(), in_string::set(), set(), Arg_comparator::set_compare_func(), Item_string::set_str_with_copy(), Item_cache_str::store(), cmp_item_row::store_value(), Item_func_ifnull::str_op(), Item::tmp_table_field_from_field_type(), Item_func_like::turboBM_compute_bad_character_shifts(), Item_func_like::turboBM_compute_suffixes(), Item_func_like::turboBM_matches(), Item_nodeset_to_const_comparator::val_int(), Item_func_find_in_set::val_int(), Item_func_field::val_int(), Item_func_locate::val_int(), Item_func_like::val_int(), Item_func_between::val_int(), Item_func_strcmp::val_int(), Item_func_xpath_sum::val_real(), Item_func_xml_update::val_str(), Item_nodeset_func::val_str(), Item_typecast::val_str(), Item_func_quote::val_str(), Item_func_export_set::val_str(), Item_func_collation::val_str(), Item_func_charset::val_str(), Item_func_set_collation::val_str(), Item_func_lpad::val_str(), Item_func_rpad::val_str(), Item_func_char::val_str(), Item_func_elt::val_str(), Item_func_soundex::val_str(), Item_func_substr_index::val_str(), Item_str_conv::val_str(), Item_func_replace::val_str(), Item_func_concat_ws::val_str(), Item_func_concat::val_str(), Item_func_min_max::val_str(), and Item_func_if::val_str().
Definition at line 64 of file item.h.
Referenced by agg_item_collations(), aggregate(), derivation_name(), DTCollation(), Item_sp_variable::fix_fields(), Item_func_sysconst::safe_charset_converter(), Item_static_string_func::safe_charset_converter(), Item_string::safe_charset_converter(), set(), Arg_comparator::set_compare_func(), and Item_func_coercibility::val_int().
1.4.7

