#include <item_strfunc.h>
Inheritance diagram for Item_func_char:


Public Member Functions | |
| Item_func_char (List< Item > &list) | |
| Item_func_char (List< Item > &list, CHARSET_INFO *cs) | |
| String * | val_str (String *) |
| void | fix_length_and_dec () |
| const char * | func_name () const |
Definition at line 517 of file item_strfunc.h.
Definition at line 520 of file item_strfunc.h.
References Item::collation, my_charset_bin, and DTCollation::set().
00520 :Item_str_func(list) 00521 { collation.set(&my_charset_bin); }
Here is the call graph for this function:

| Item_func_char::Item_func_char | ( | List< Item > & | list, | |
| CHARSET_INFO * | cs | |||
| ) | [inline] |
Definition at line 522 of file item_strfunc.h.
References Item::collation, and DTCollation::set().
00522 :Item_str_func(list) 00523 { collation.set(cs); }
Here is the call graph for this function:

| void Item_func_char::fix_length_and_dec | ( | ) | [inline, virtual] |
Implements Item_result_field.
Definition at line 525 of file item_strfunc.h.
References Item_func::arg_count, DTCollation::collation, Item::collation, Item::max_length, Item::maybe_null, and charset_info_st::mbmaxlen.
00526 { 00527 maybe_null=0; 00528 max_length=arg_count * collation.collation->mbmaxlen; 00529 }
| const char* Item_func_char::func_name | ( | ) | const [inline, virtual] |
Implements Item.
Definition at line 2067 of file item_strfunc.cc.
References String::append(), Item_func::arg_count, Item_func::args, Item_str_func::check_well_formed_result(), DTCollation::collation, Item::collation, DBUG_ASSERT, Item::fixed, String::length(), Item::null_value, String::realloc(), String::set_charset(), and Item_str_func::val_int().
02068 { 02069 DBUG_ASSERT(fixed == 1); 02070 str->length(0); 02071 for (uint i=0 ; i < arg_count ; i++) 02072 { 02073 int32 num=(int32) args[i]->val_int(); 02074 if (!args[i]->null_value) 02075 { 02076 if (num&0xFF000000L) { 02077 str->append((char)(num>>24)); 02078 goto b2; 02079 } else if (num&0xFF0000L) { 02080 b2: str->append((char)(num>>16)); 02081 goto b1; 02082 } else if (num&0xFF00L) { 02083 b1: str->append((char)(num>>8)); 02084 } 02085 str->append((char) num); 02086 } 02087 } 02088 str->set_charset(collation.collation); 02089 str->realloc(str->length()); // Add end 0 (for Purify) 02090 return check_well_formed_result(str); 02091 }
Here is the call graph for this function:

1.4.7

