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


Public Member Functions | |
| Item_func_conv (Item *a, Item *b, Item *c) | |
| const char * | func_name () const |
| String * | val_str (String *) |
| void | fix_length_and_dec () |
| bool | check_partition_func_processor (byte *bool_arg) |
Definition at line 571 of file item_strfunc.h.
| void Item_func_conv::fix_length_and_dec | ( | ) | [inline, virtual] |
Implements Item_result_field.
Definition at line 577 of file item_strfunc.h.
References Item::collation, Item::default_charset(), Item::max_length, and DTCollation::set().
00578 { 00579 collation.set(default_charset()); 00580 max_length= 64; 00581 }
Here is the call graph for this function:

| const char* Item_func_conv::func_name | ( | ) | const [inline, virtual] |
Implements Item.
Definition at line 2348 of file item_strfunc.cc.
References abs, Item_func::args, String::charset(), String::copy(), DBUG_ASSERT, Item::default_charset(), endptr, err, Item::fixed, int(), String::length(), longlong2str, my_empty_string(), my_strntoll, my_strntoull, Item::null_value, String::ptr(), Item::unsigned_flag, Item_str_func::val_int(), and Item::val_str().
02349 { 02350 DBUG_ASSERT(fixed == 1); 02351 String *res= args[0]->val_str(str); 02352 char *endptr,ans[65],*ptr; 02353 longlong dec; 02354 int from_base= (int) args[1]->val_int(); 02355 int to_base= (int) args[2]->val_int(); 02356 int err; 02357 02358 if (args[0]->null_value || args[1]->null_value || args[2]->null_value || 02359 abs(to_base) > 36 || abs(to_base) < 2 || 02360 abs(from_base) > 36 || abs(from_base) < 2 || !(res->length())) 02361 { 02362 null_value=1; 02363 return 0; 02364 } 02365 null_value=0; 02366 unsigned_flag= !(from_base < 0); 02367 if (from_base < 0) 02368 dec= my_strntoll(res->charset(),res->ptr(),res->length(),-from_base,&endptr,&err); 02369 else 02370 dec= (longlong) my_strntoull(res->charset(),res->ptr(),res->length(),from_base,&endptr,&err); 02371 ptr= longlong2str(dec,ans,to_base); 02372 if (str->copy(ans,(uint32) (ptr-ans), default_charset())) 02373 return &my_empty_string; 02374 return str; 02375 }
Here is the call graph for this function:

1.4.7

